cancel
Showing results for 
Search instead for 
Did you mean: 

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

LWei.1
Associate II

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!

1 ACCEPTED SOLUTION

Accepted Solutions
LWei.1
Associate II

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.

View solution in original post

3 REPLIES 3
LWei.1
Associate II

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

Pavel A.
Evangelist III

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
Associate II

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.