cancel
Showing results for 
Search instead for 
Did you mean: 

Bug in CubeMX v 5.6.1 when selecting DMA for ADC1/2 and BDMA for ADC3 for STM32H753IITx? Is there a fix or have I done something wrong?

DGrön.1
Associate II

Generated code in main.c looks like this and lacks function name for the second block.

/** 

 * Enable DMA controller clock

 */

static void MX_BDMA_Init(void) 

{

 /* DMA controller clock enable */

 __HAL_RCC_BDMA_CLK_ENABLE();

 /* DMA interrupt init */

 /* BDMA_Channel0_IRQn interrupt configuration */

 HAL_NVIC_SetPriority(BDMA_Channel0_IRQn, 5, 0);

 HAL_NVIC_EnableIRQ(BDMA_Channel0_IRQn);

}

/** 

 * Enable DMA controller clock

 */

{

 /* DMA controller clock enable */

 __HAL_RCC_DMA1_CLK_ENABLE();

 /* DMA interrupt init */

 /* DMA1_Stream0_IRQn interrupt configuration */

 HAL_NVIC_SetPriority(DMA1_Stream0_IRQn, 5, 0);

 HAL_NVIC_EnableIRQ(DMA1_Stream0_IRQn);

}

3 REPLIES 3

Hello DGrön.1,

Could you please explain more your issue, is your problem with the CubeMX generated code ? What do you think are the missing functions?

Thanks,

BR,

Khouloud.

Hello Khouloud,
Before experiencing this problem I have ADC1 and ADC2 working in dual regular simultaneous mode with circular DMA. CubeMX supplies function prototype declaration and function MX_DMA_Init and a call to it in main.c.
Then I add in CubeMX ADC3 using 4 channels and to get all 4 channel values I use circular DMA.
CubeMX adds function prototype declaration and function MX_BDMA_Init and REMOVES the above mentioned function prototype declaration and function header MX_DMA_Init in main.c. MX_DMA_Init function body remains. See the code below. The second block in curly brackets lacks the function header “static void MX_BDMA_Init(void)�?.
To repair the damage I put back the function declaration, function header and call to it. Annoying.
Chip is STM32H753IITx LQFP176 and CubeMX is v5.6.1.
Best Regards
Dennis Gröning

Hello DGrön.1,

Thanks for your feedback, issue is detected and will be reported internally for revision and fix.

BR,

Khouloud.