How to change ADC's Number of Conversion?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-08-31 3:27 PM
Hi, there:
We need to change the Number of Conversion of the ADC during the run in STM32WB MCU. It is configured with multiple channels and with DMA.
(1) Can we just de-initialize the HADC and re-initialize a new one? Will it affect the interrupt and DMA?
(2) Can we just modify the SQR1 register as following (in stm32wbxx_hal_adc.c)?
MODIFY_REG(hadc->Instance->SQR1, ADC_SQR1_L, (hadc->Init.NbrOfConversion - (uint8_t)1));
Thanks for help in advance.
-WQ
Labels:
- Labels:
-
ADC
-
STM32WB series
This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-09-04 9:24 AM
Read the reference manual.
