You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The measured Isense current and Vbus voltages are somewhat inaccurate (significantly too low) when compared to multimeter measurements.
How To Reproduce
Compile & Run the project Projects\NUCLEO-G474RE\Applications\USB_PD\SNK1M1_Sink.
Provide a power supply to CN3 and measure the current.
Run STM32CubeMonitor-UCPD.
Compare the displayed Ibus with the manual measurement.
Additional context
The ADC calibration is disabled for the STM32G474. This results in a significant offset of the ADC values. In a simple test project, using the ADC without calibration yields similar offsets. Performing the calibration as shown eliminates this issue:
Additionally, the two conversion formulas (voltage, current) use VDD_VALUE to calculate the actual voltage:
vadc= (ADCData*VDD_VALUE) / ADC_FULL_SCALE;
However, when jumper JP8 on the NUCLEO board is set to position 1-2, the external reference voltage with value 3.25V is used. This is the default. The two solutions would be:
Replace VDD_VALUE by 3250
The documentation for the X-NUCLEO-SRC1M1 or for x-cube-tcpp should indicate that JP8 needs to be set to 2-3
Since the measurements are not ratiometric, and the absolute values of both voltages are of interest, it would be desirable to keep using the fixed reference of 3.25V, and adjust the code accordingly.
The text was updated successfully, but these errors were encountered:
Describe the set-up
Describe the bug
The measured Isense current and Vbus voltages are somewhat inaccurate (significantly too low) when compared to multimeter measurements.
How To Reproduce
Compile & Run the project
Projects\NUCLEO-G474RE\Applications\USB_PD\SNK1M1_Sink
.Provide a power supply to CN3 and measure the current.
Run STM32CubeMonitor-UCPD.
Compare the displayed Ibus with the manual measurement.
Additional context
The ADC calibration is disabled for the STM32G474. This results in a significant offset of the ADC values. In a simple test project, using the ADC without calibration yields similar offsets. Performing the calibration as shown eliminates this issue:
Additionally, the two conversion formulas (voltage, current) use
VDD_VALUE
to calculate the actual voltage:However, when jumper JP8 on the NUCLEO board is set to position
1-2
, the external reference voltage with value 3.25V is used. This is the default. The two solutions would be:VDD_VALUE
by3250
x-cube-tcpp
should indicate that JP8 needs to be set to2-3
Since the measurements are not ratiometric, and the absolute values of both voltages are of interest, it would be desirable to keep using the fixed reference of 3.25V, and adjust the code accordingly.
The text was updated successfully, but these errors were encountered: