K60 UART ISR not stopping

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

K60 UART ISR not stopping

跳至解决方案
1,635 次查看
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 项奖励
回复
1 解答
1,231 次查看
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 项奖励
回复
2 回复数
1,232 次查看
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 项奖励
回复
1,231 次查看
barric
Contributor I

Thanks Paolo, that was exactly the problem!

0 项奖励
回复