Skip to main content
LWei.1
Associate
Oct 4, 2020 5:08 AM UTC
Solved

UART DMA Rx, IDLE interrupt is triggered, but doesn't look correctly.

Hi,

I am trying to use DMA to realize uncertain length uart message receiving on STM32H745i-DISCO board (on core CM7). My idea is to used IDLE interrupt and then disable the DMA_stream, get the NDTR register and abort the transfer to trigger the DMA TC interrrupt to get the data. I send a string at once, but looks like everytime the IDLE interrupt triggered after receive the first byte. And the the UART_DMAReceiveCplt() function never get chance to be called. Can anyone help me with that?

Thanks!

This topic has been closed for replies.
LWei.1
LWei.1Best answer
Associate
Oct 9, 2020 7:21 PM UTC

I moved the code from CM7 to CM4, it works. I think it shall be related to DMA_MEM accessibility issue for M7 core. I will try to figure out it by myself.

Also, Tilen Majerle's github repo also used IDLE interrupt instead of RTO interrupt.

3 replies

LWei.1
LWei.1Author
Associate
Oct 6, 2020 5:39 PM UTC

Can anyone give me some hint what is wrong with my implementation? Thanks!

Pavel A.
Oct 6, 2020 8:52 PM UTC

IMHO for this better to use RTO interrupt (RX timeout) rather than IDLE.

Example can be found in Tilen Majerle's github repo.

-- pa

LWei.1
LWei.1AuthorBest answer
Associate
Oct 9, 2020 7:21 PM UTC

I moved the code from CM7 to CM4, it works. I think it shall be related to DMA_MEM accessibility issue for M7 core. I will try to figure out it by myself.

Also, Tilen Majerle's github repo also used IDLE interrupt instead of RTO interrupt.