Skip to content

Conversation

@FRASTM
Copy link
Contributor

@FRASTM FRASTM commented Mar 21, 2023

In the adc_stm32 driver, at adc start_read(), the OVR flag when it exists in ADC peripheral --> not available on the stm32f1 serie.

Following the #52965
there was a regression (build error) on the stm32f1 serie:

` $ west build -p auto -b nucleo_f103rb tests/drivers/adc/adc_api/`  
[1/11] Building C object zephyr/drivers/adc/CMakeFiles/drivers__adc.dir/adc_stm32.c.obj
./drivers/adc/adc_stm32.c: In function 'start_read':
./drivers/adc/adc_stm32.c:1091:9: warning: implicit declaration of function 'LL_ADC_ClearFlag_OVR'; did you mean 'LL_ADC_ClearFlag_EOS'? [-Wimplicit-function-declaration]
 1091 |         LL_ADC_ClearFlag_OVR(adc);

The stm32f1x serie has no OVerRun interrupt.
A simple compilation Flag will fix the issue.

Signed-off-by: Francois Ramu [email protected]

At adc start_read, the OVR flag when it exists in ADC peripheral
--> not available on the stm32f1 serie.

Signed-off-by: Francois Ramu <[email protected]>
*/
adc_stm32_enable(adc);

#if !defined(CONFIG_SOC_SERIES_STM32F1X)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note, there's still two OVR instances in dma_callback which needs to be handled. This build isn't failing because there's no test build with the STM32F1+ADC+DMA. It's done correctly in my PR, but I can also close it in favour if this one if this comment is addressed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the PR #56017

@FRASTM FRASTM closed this Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ADC Analog-to-Digital Converter (ADC) platform: STM32 ST Micro STM32

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants