Closed JohnK1987 closed 3 months ago
Passing CI shield ADC test:
10: [1722709830.99][CONN][RXD] Based on target.default-adc-vref of 3.30V, the digital IO voltage of this target is 3.30V.
10: [1722709831.00][CONN][RXD] >>> Running case #2: 'Test reading analog values with the ADC'...
10: [1722709831.00][CONN][INF] found KV pair in stream: {{__testcase_start;Test reading analog values with the ADC}}, queued...
10: [1722709831.04][CONN][RXD] PWM duty cycle of 0.0% produced an ADC reading of 0.0% (expected 0.0%)
10: [1722709831.09][CONN][RXD] PWM duty cycle of 10.0% produced an ADC reading of 9.8% (expected 10.0%)
10: [1722709831.14][CONN][RXD] PWM duty cycle of 20.0% produced an ADC reading of 19.7% (expected 20.0%)
10: [1722709831.19][CONN][RXD] PWM duty cycle of 30.0% produced an ADC reading of 29.5% (expected 30.0%)
10: [1722709831.24][CONN][RXD] PWM duty cycle of 40.0% produced an ADC reading of 39.5% (expected 40.0%)
10: [1722709831.29][CONN][RXD] PWM duty cycle of 50.0% produced an ADC reading of 49.5% (expected 50.0%)
10: [1722709831.34][CONN][RXD] PWM duty cycle of 60.0% produced an ADC reading of 59.7% (expected 60.0%)
10: [1722709831.39][CONN][RXD] PWM duty cycle of 70.0% produced an ADC reading of 69.8% (expected 70.0%)
10: [1722709831.44][CONN][RXD] PWM duty cycle of 80.0% produced an ADC reading of 80.2% (expected 80.0%)
10: [1722709831.49][CONN][RXD] PWM duty cycle of 90.0% produced an ADC reading of 90.3% (expected 90.0%)
10: [1722709831.50][CONN][RXD] >>> 'Test reading analog values with the ADC': 1 passed, 0 failed
10: [1722709831.50][CONN][RXD] <greentea test suite>:0::PASS
Ok, I made few changes to make DAC working also with ADC because a bug was found during CI test (ADC and DAC were work separately but not together). Positive result of DAC test is below. @multiplemonomials can you please repeat the ADC/DAC tests for sure?
PWM to ADC and DAC to ADC tests are now passing!
Summary of changes
This PR brings AnalogIn and AnalogOut APIs for STM32H5 family.
Impact of changes
On Nucleo-H503RB there is a conflict between DAC's pins and other equipments (LED and STDIO console). So because of that the AnalogOut was removed for Nucleo-H503RB but not for the MCU it self.
Migration actions required
Documentation
Pull request type
Test results
AnalogIn and AnalogOut were tested just by a poti and a multimetr.