cancel
Showing results for 
Search instead for 
Did you mean: 

LPUART RX DMA Configured But Does Not Start!

Rogers.Gary
Senior II

Hello:

I seemingly have the LPUART now configured correctly. For sure the transmit (without DMA) functions OK. I only have receive DMA configured. As usual, it was done in Cube.

uint8_t rxBuff[40];

#define RX_DMA_SZ 10

The start is the same as I am using in another program that does work:

   HAL_UART_Receive_DMA(&hlpuart1, (uint8_t*)rxBuff, RX_DMA_SZ);

I also have both half/complete callback defined.

When Teraterm sends characters I can see them on the receive line from the 485 transceiver to the L433. I have a breakpoint in the interrupt under the IRQ interrupt and the DMA interrupt. The breakpoint is never hit.

I have an ADC DMA that works just fine, this one doesn't feel quite the same. What would cause the UART DMA not to function?

1 ACCEPTED SOLUTION

Accepted Solutions
Rogers.Gary
Senior II

Found issue. Had the LPUART global interrupt still enabled.

View solution in original post

4 REPLIES 4
Rogers.Gary
Senior II

Hi,

I removed everything from the CubeMX configurator with the exception of 5 pins:

LPUART RX

LPUART TX

UART TX CONTROL (GPIO)

SWDIO

SWCLK

Regenerated the code. Put a breakpoint on:

 HAL_DMA_IRQHandler(&hdma_lpuart_rx);

and on:

HAL_UART_IRQHandler(&hlpuart1);

Neither gets hit.

I scope the RX line and see good data going into to abyss, but the device does not respond.

What in the world is going on? Can anyone offer a suggestion?

Polled Rx works?

JW

Rogers.Gary
Senior II

Found issue. Had the LPUART global interrupt still enabled.

silly oversight. I did not catch the IRQ was also enabled. I suppose the software gets a bit confused? Thanks for looking at this post.