- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are always welcome, Tyler!
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you both!
I had the same and now its solved
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Welcome in the forum! Do not hesitate to ask any quiestions.
Bob