Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDO Mismatch Incorrect #10

Open
fleS-dnoyeB opened this issue Nov 24, 2024 · 1 comment
Open

PDO Mismatch Incorrect #10

fleS-dnoyeB opened this issue Nov 24, 2024 · 1 comment

Comments

@fleS-dnoyeB
Copy link

Caution
The Issues are strictly limited for the reporting of problem encountered with the software provided in this project.
For any other problem related to the STM32 product, the performance, the hardware characteristics and boards, the tools the environment in general, please post a topic in the ST Community/STM32 MCUs forum.

Describe the set-up
NUCLEO-G071RB + X-NUCLEO-SRC1M1

Describe the bug
Within the context of a sink application. If a PDO is described with 0 current, then the PDO comparison will always fail. e.g.
SNK PDO = 5V 0A
SRC PDO = 5V 3A
Will return a PDO mismatch even though technically this isn't a mismatch unless its a rule violation I am unaware of.

How To Reproduce
Create a SNK PDO with a 0A current level. have a SRC PDO with matching voltage and >0A available.

Additional context
I am not yet familiar enough with github to post exact links but
Projects/NUCLEO-G071RB/Applications/USB_PD/SNK1M1_Sink/USBPD/Target/usbpd_dpm_user.c
line 1176

        if (  (snkvoltage50mv == srcvoltage50mv)
            &&(snkopcurrent10ma <= srcmaxcurrent10ma))
        {
          currentrequestedpower = (snkvoltage50mv * snkopcurrent10ma) / 2; /* to get value in mw */
          currentrequestedvoltage = snkvoltage50mv;
        }

currentrequestedpower will end up as 0 because snkopcurrent10ma is 0. When currentrequestedpower is 0 it is considered a mismatch. But that's not true. since the requested current is less than the available current.

Screenshots
N/A

@FBLSTM
Copy link

FBLSTM commented Dec 3, 2024

ST Internal Reference: 197647
This issue is reported to dedicated team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants