STM32CubeMX don't generate DMA SW4STM32 code
I have setup the STM32CubeMX project.. (STM32F302RExx)
I use the ADC in continues / scan mode.
I have DMAContReq = true..
I then setup DMA on ADC1-CH1 with HIGH prio..
but when i generate my Cube-code... i don't see ANY code for the DMA setup ??
The ADC's works fine if i poll them.
This : 'DMA_HandleTypeDef hdma_adc1;' I see..
but thats IT .. no more references.. i have all in my MainFile..
Any clues ?
/M.H.
p.s..
I'm guessing i am missing something like THIS (THIS IS NOT TO FIND IN CUBE-GENERATED CODE):
hdma_adc1.Instance = DMA1_Channel1;
hdma_adc1.Init.Direction = DMA_PERIPH_TO_MEMORY; hdma_adc1.Init.PeriphInc = DMA_PINC_DISABLE; hdma_adc1.Init.MemInc = DMA_MINC_ENABLE; hdma_adc1.Init.PeriphDataAlignment = DMA_PDATAALIGN_WORD; hdma_adc1.Init.MemDataAlignment = DMA_MDATAALIGN_WORD; hdma_adc1.Init.Mode = DMA_CIRCULAR; hdma_adc1.Init.Priority = DMA_PRIORITY_HIGH; if (HAL_DMA_Init(&hdma_adc1) != HAL_OK) { Error_Handler(); }__HAL_LINKDMA(&hadc1,DMA_Handle,hdma_adc1);
#stm32cubemx*