Cannot Set DMA to Secure (CCRx SECM)
I'm attempting to configure peripherals in STM32CubeMX, but I'm getting error_handler calls from my DMA configuration for ADC1.
All the necessary peripherals (DMA1 channel1, ADC1) are configured as secure in CubeMX, but when HAL_ADC_MspInit attempts to set the SECM bit for hdma_adc1, the write fails. I am running only a secure image (i.e., no non-secure image is loaded). In IAR, "TrustZone" is enabled, and set to "Secure" mode.
On boot, I call the following, in order:
HAL_Init();
SystemClock_Config();
MX_GTZC_S_Init();
MX_ICACHE_Init();
MX_DMA_Init();
MX_GPIO_Init();
MX_ADC1_Init();
The Error Handler is hit when attempting to set hdma_adc1's source point, which is secure.
