cancel
Showing results for 
Search instead for 
Did you mean: 

STM32f407 dma->uart transfer stops after some time

MOtto.1
Associate II

Hi, i have a certain problem.

I have an application which continuously reads out data from sensors. Each sensor read will be triggered by me by using a dma-uart transaction. On the receiving side i have a uart-dma in cyclic mode which fills up the buffer and gives me the wr/rd pointer to the incomming bytes. Currently i got 2 sensors each running on it's own task, so there is also a RTOS involved. All sensors are on a RS485-Bus in halfduplex mode, so i have to toggle the data-transmit or receive pin of the tranceiver by software. For that i'm waitng on the uart TC-Flag to occure inside an ISR to switch back to receive.

Now there is a problem. At first everything works fine, but after several hours i see that the transceiver is still on transmitting didn't went back to receive, so the whole Bus is blocked. Task is still running. 

Could it be that interrupts are delayed that much (RTOS or i disable interrupts in my debug printfs) or even missed so that my uartTC-interrupt is enabled after uartTC is allready set?

I have allready changed the code in the way i am not enabling the uartTC interrupt in the dma-ISR. And somemore.

I want to tackle the issue and get into the situation to switch it on and off to confirm my changes are valid.  

 

Thanks

10 REPLIES 10

so why you dont use one of the 4 (!) uarts, that are appropriate for this 485 driver ??? 

AScha3_0-1699258324356.png

 

If you feel a post has answered your question, please click "Accept as Solution".