Skip to main content
Rogers.Gary
Senior II
March 27, 2019
Solved

LPUART RX DMA Configured But Does Not Start!

  • March 27, 2019
  • 4 replies
  • 1474 views

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?

This topic has been closed for replies.
Best answer by Rogers.Gary

Found issue. Had the LPUART global interrupt still enabled.

4 replies

Rogers.Gary
Senior II
March 27, 2019

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?

waclawek.jan
Super User
March 27, 2019

Polled Rx works?

JW

Rogers.Gary
Senior II
March 27, 2019

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.

Rogers.Gary
Rogers.GaryAuthorBest answer
Senior II
March 27, 2019

Found issue. Had the LPUART global interrupt still enabled.