STM32H5 LPUART1 RX DMA not receiving
Using STM32CubeMX 6.18.1 and STM32CubeIDE 2.2.0 on Nucleo-STM32H563ZI under ThreadX. LPUART1 is transmitting 5-10 bytes to Nucleo-G431RB which responds with 6-10 bytes. I can see the exchange on a logic analyzer. The DMA transmits 10 bytes, the last 5 of which are all zeroes. The response starts around the third zero byte and all 6 bytes flow back to the STM32H563 LPUART1 which does not respond.
I started this process with
HAL_UARTEx_ReceiveToIdle_DMA(&hlpuart1, rs422rxDmaBuf, 10);
__HAL_DMA_DISABLE_IT(hlpuart1.hdmarx, DMA_IT_HT);
After 2 calls to HAL_UART_ErrorCallback() (using breakpoints in HAL_UART_ErrorCallback() to verify it). The first call has DMA errors, so I call HAL_UARTEx_ReceiveToIdle_DMA(). On the second call there is no DMA error so it saves some registers for printing later and I see: DMA CSR=0x00000001 DMA CCR=0x00005D00 LPUART ISR=0x00600000. So why the call to HAL_UART_ErrorCallback() ? In all this while I am still sending 5 bytes and getting a response of 6 bytes, I am not seeing any activity at the breakpoints in HAL_UARTEx_RxEventCallback() nor HAL_UART_RxCpltCallback(). At least one of them should get some data, right?
So, what step(s) am I missing to receive the response?
I changed the DMA channel from 0 to 4 because the channel 4 has 32 bytes of FIFO which should hold all 10 bytes of a maximum response, but no change, nothing received.
