ExampleADC is the minimal ADC smoke test.
It validates:
- ADC peripheral initialization
- pin configuration on
PA0 - repeated sampling through the
ADCDomainAPI - end-to-end visibility of the converted value in firmware memory
./tools/build-example.sh --example adc --preset nucleo-debug --test 0Equivalent macro selection:
EXAMPLE_ADCTEST_0
- Use a Nucleo or board build that exposes
PA0. - Wire
PA0first to3.3V, then toGND. - Open a debugger watch on
adc_value.
The example:
- creates one ADC instance on
PA0 - samples every 100 ms
- stores the latest raw reading in the global
adc_value
There is no UART, TCP, UDP, or automated host-side checker for this example.
- With
PA0tied to3.3V,adc_valueshould move close to the top of the ADC range. - With
PA0tied toGND,adc_valueshould move close to zero. - The variable should update continuously in the debugger.
- Value does not move: wrong pin, missing board init, bad wiring, or ADC clock/config issue.
- Value is noisy or saturated: floating input, analog ground issue, or wrong source impedance.
- Build fails only for this example: board pin mapping does not support
PA0as configured.