K60 UART ISR not stopping

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

K60 UART ISR not stopping

Jump to solution
894 Views
barric
Contributor I

hi everyone, I'm having trouble with my K60 UART ISR. I want to set a flag in the ISR when UART transfer has been completed or when data has been received. I've set UART3_C2=0x5c (TCIE, ILIE, TE, RE) and the ISR is getting called after I've sent a byte but then it's getting called again and again without stopping (and without me sending/receiving data). I disable the IRQ in the beginning of my ISR and enable it in the end but it doesn't work out. I've tried reading all kinds of status flags or UART3_D and I even tried writing to latter but still my ISR won't stop being called.

 

Maybe i gotta say that I didn't know how to register my ISR so I just entered the function name in the vector table. Don't know if the system behaves differently this way.

 

How can I make it work properly? BTW: I'm using FreeRTOS (if that matters)

0 Kudos
1 Solution
490 Views
PaoloRenzo
Contributor V

Hi

 

Are you disabling the xmit interrupt when you don't have anything else to xmit? Otherwise, tx irq will be signaling about available space in UART buffer

 

Also looking at MQX uart driver might help you to get an idea about this

View solution in original post

0 Kudos
2 Replies
491 Views
PaoloRenzo
Contributor V

Hi

 

Are you disabling the xmit interrupt when you don't have anything else to xmit? Otherwise, tx irq will be signaling about available space in UART buffer

 

Also looking at MQX uart driver might help you to get an idea about this

0 Kudos
490 Views
barric
Contributor I

Thanks Paolo, that was exactly the problem!

0 Kudos