External SCB Uart Interrupt keeps firing

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

 I am firing an interrupt when I received data in my RX Fifo for my SCB Uart block. I can see that I enter the ISR but I never seem to leave. I can disable the interrupt in the ISR but then I can't get back into it when more data comes in. Why am I having this issue? Attached is my project.

0 Likes
5 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

First: Your interrupt mode should be "Level" and not "Derived". Additionally you should read the GetRxInterrupsourceMasked() and issue a ClearRxInterruptSource(); see datasheet.

   

In your interrupt handler you should not  start or stop the interrupt.

   

 

   

You read several bytes in the handler without checking if there are any recieved. This will lead to reading zeroes as the datasheet states.Better will be to read a char and store it into a circular buffer and process the data from there.

   

Bob

0 Likes
Anonymous
Not applicable

 Thanks Bob! You are a lifesaver. I have had issues with this in the past and I didn't realize that I needed to do what you described. I simply did:

   

Bluetooth_ClearRxInterruptSource(Bluetooth_GetRxInterruptSourceMasked());

   

All is well now. I definitely should take into consideration your circular buffer idea so that I don't read in zeros! Thank you for your help!

   

Best,

   

Tyler

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

You are always welcome, Tyler!

   

 

   

Bob

0 Likes
jobic_1363266
Level 1
Level 1
5 likes given First like received First like given

 Thank you both!

   

I had the same and now its solved

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Welcome in the forum! Do not hesitate to ask any quiestions.

   

Bob

0 Likes