UART RX Interrupt

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

Hi everybody! 

   

I'm new at the forum and in psoc programming as well. I've been trying to get UART communication to work, but i'm facing some problems. I want to receive 6 bytes through the RX and use them in my routine. At first, to get to know how the interrupts work I've tried to fire the interrupt sending a number through realterm, I did fire the interrupt, but I'm not getting out of it. Could you guys help me out? Thanks =D

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

Welcome in the forum!

   

Some suggestions:

   

specify "flag" as volatile

   

clear all pending interrupts not only the masked

   

Do not send back a character within the interrupt handler!!!

   

What makes you think that your interrupt handler is entered, but not exited??

   

The LED will change for some  µs which you cannot see with the naked eye.

   

What Cypress kit are you using? -049?

   

A working solution: Set uart to "Internal interrupt" and in main-loop check PC_SpiUartGetRxBufferSize() for the number of characters received.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Thanks for your reply, Bob!

   

 

   

The command to clear all pending interrupts is: 'RX_isr_ClearPending();'?

   

I assumed that the interrupt was fired because I put a line to write data to the terminal inside of the CY_ISR(RX_isr). 

   

I'm using the CY8CKIT-049-42xx.

   

Am I able to receive 6 byte long data using internal interrupt? Thanks 

0 Likes