CubeMX not consistent with generating MX_DMA_Init() before MX_USART6_UART_Init(). Bug?
- October 7, 2021
- 1 reply
- 1105 views
Hi, I am wondering why STm32CubeMX in some projects will generate the correct order of MX_DMA_Init() before MX_USART6_UART_Init(), but in other projects it will reverse that order. if the order is reversed, then the DMA will not work.
I have looked into the *.ioc-files. I notived the Mcu.IPxx fields are not ordered correctly starting with Mcu.IP10.
working file (DMA_init before USART6_init)
Mcu.Family=STM32H7
Mcu.IP0=CORTEX_M7
Mcu.IP1=DMA
Mcu.IP2=NVIC
Mcu.IP3=RCC
Mcu.IP4=SYS
Mcu.IP5=USART6
Mcu.IPNb=6
not working file (DMA_init after USART6_init)
Mcu.Family=STM32H7
Mcu.IP0=CORTEX_M7
Mcu.IP1=DEBUG
Mcu.IP10=TIM3
Mcu.IP11=USART6
Mcu.IP2=DMA
Mcu.IP3=ETH
Mcu.IP4=FREERTOS
Mcu.IP5=HRTIM
Mcu.IP6=LWIP
Mcu.IP7=NVIC
Mcu.IP8=RCC
Mcu.IP9=SYS
Mcu.IPNb=12
Is there anything I can do to get generated code that is independent of the Mcu.IPNb < 10 ?
