cancel
Showing results for 
Search instead for 
Did you mean: 

Potential Bug in CubeMX DMA Configuration?

Rogers.Gary
Senior II

Hello:

I was having a load of issues getting my receive DMA functioning. My device is an STM32L433CCU. I am also using ADC1 DMA, which was functioning good.

To determine what might be going on, I started a fresh copy of Cube configurator, and started with LPUART and continued to check it's DMA functioning with each peripheral I added back in and checked. All other functions such as PWM worked OK.

Before I started on the other function that uses DMA, the ADC, I made a copy of the CubeMX file. I then set up 5 ADC channels, and the DMA. The ADC DMA worked as expected.

I then tested the UART and the receive DMA stopped transferring data. That is, the callback functions, but no data is coming in the buffer.

I commented out these 3 lines:

MX_ADC1_Init();

HAL_ADCEx_Calibration_Start(&hadc1, ADC_SINGLE_ENDED);

HAL_ADC_Start_DMA(&hadc1, (uint32_t*)dmaBuffer, DMA_SIZE); 

and the receive DMA was working OK. I checked the adc.c and uart.c files, they are using different DMA channels and requests.

Any idea what is going on, and what setup state might be causing this issue?

Thanks for any help!

0 REPLIES 0