2022-08-31 03: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
2022-09-04 09:24 AM
Read the reference manual.