ADC regular conversion samples only the first channel when running application from QSPI FLASH
Hi
I have a project running for the last 2 years: STM32H7, CubeMX for setup.
I have 6 ADC channels on ADC3, running in "Regular, non-continous conversion". This works.
But now I want to run the application from the external QSPI FLASH. This works almost OK, but the ADC sampling fails: It only samples the first channel in the sequence of 6 channels. The next is never started.
I have made no changes to the GPIO setup, except some unused pins, which are configured as analog inputs pr. default in the HAL init. This does not work with the QSPI FLASH interface, because it somehow changes the memory mapping setup in the (bbot)loader. So I just remove the init of the unused pins like this in gpio.c:
/*Configure GPIO pins : PA0 PA3 PA4 PA5
PA6 PA8 */
GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_3|GPIO_PIN_4|GPIO_PIN_5
|GPIO_PIN_6|GPIO_PIN_8;
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
GPIO_InitStruct.Pull = GPIO_NOPULL;
// HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
/*Configure GPIO pins : PB0 PB1 PB2 PB10
PB11 PB12 */
GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_10
|GPIO_PIN_11|GPIO_PIN_12;
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
GPIO_InitStruct.Pull = GPIO_NOPULL;
// HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
I have double checked the CubeMX setup and registers during runtime, and everything looks fine, and exactly the same as when running from internal FLASH (see screenshots below).
The question is: Why does the ADC conversion suddenly not continue after sampling the first channel in the sequence, when running from external QSPI FLASH?


