-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Closed
Labels
area: ADCAnalog-to-Digital Converter (ADC)Analog-to-Digital Converter (ADC)bugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugplatform: STM32ST Micro STM32ST Micro STM32priority: highHigh impact/importance bugHigh impact/importance bug
Description
Describe the bug
Several ADC-related test cases will not build on nucleo_u385rg_q/stm32u385xx.
Affected test cases:
libraries.devicetree.api_ext
drivers.adc.dma_st_stm32
drivers.adc
git bisect
yields commit 56621fa:
commit 56621fa1dee248a953d97d6e91b825d3753fdbd0
Author: Matt Rodgers <[email protected]>
Date: Fri Jun 6 16:40:36 2025 +0100
drivers: adc: stm32: add support for differential mode
Differential mode support consists of:
- If differential mode is supported by the underlying hardware AND at
least one differential channel is enabled in the devicetree for this
ADC instance, then perform a differential mode calibration in addition
to the usual single ended calibration during initialisation.
- Set channels to the appropriate differential or single ended mode
during channel setup.
Currently the N6 series is not supported even though the underlying
hardware supports differential mode, due to complications in the
calibration procedure.
Signed-off-by: Matt Rodgers <[email protected]>
Co-authored-by: Guillaume Gautier <[email protected]>
drivers/adc/adc_stm32.c | 81 ++++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 74 insertions(+), 7 deletions(-)
Regression
- This is a regression.
Steps to reproduce
west twister -p nucleo_u385rg_q/stm32u385xx -s libraries.devicetree.api_ext -s drivers.adc -s drivers.adc.dma_st_stm32
Relevant log output
<...>/zephyr/drivers/adc/adc_stm32.c: In function 'adc_stm32_calibration_start':
<...>/zephyr/drivers/adc/adc_stm32.c:502:68: error: 'LL_ADC_DIFFERENTIAL_ENDED' undeclared (first use in this function)
502 | uint32_t calib_type = single_ended ? LL_ADC_SINGLE_ENDED : LL_ADC_DIFFERENTIAL_ENDED;
| ^~~~~~~~~~~~~~~~~~~~~~~~~
<...>/zephyr/drivers/adc/adc_stm32.c:502:68: note: each undeclared identifier is reported only once for each function it appears in
<...>/zephyr/drivers/adc/adc_stm32.c:502:18: error: unused variable 'calib_type' [-Werror=unused-variable]
502 | uint32_t calib_type = single_ended ? LL_ADC_SINGLE_ENDED : LL_ADC_DIFFERENTIAL_ENDED;
| ^~~~~~~~~~
cc1: all warnings being treated as errors
Impact
Annoyance – Minor irritation; no significant impact on usability or functionality.
Environment
- OS: Ubuntu 24.04
- Toolchain: Zephyr SDK 0.17.2
- SHA: 1cb0b6a
Additional Context
Metadata
Metadata
Assignees
Labels
area: ADCAnalog-to-Digital Converter (ADC)Analog-to-Digital Converter (ADC)bugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugplatform: STM32ST Micro STM32ST Micro STM32priority: highHigh impact/importance bugHigh impact/importance bug