cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor
289 Views
Registered: ‎10-24-2018

UART IN INTERRUPPT MODE

Hello all,

I am trying to user uart in interrupt mode.I have taken the uart_itnr.c example. I am able to run the example . Then i kept uart in  normal mode. My target is send some 200 Bytes of data and store in buffer. FIFO size is configured for 8 bytes size. Whenever i am sending some data , i am able to hit breakpoint in handler part. But I am not getting how to store the data in some local buffer. I am attaching my code. Please guide me

Thanks & Regards

Tags (1)
0 Kudos
2 Replies
Highlighted
Moderator
Moderator
234 Views
Registered: ‎04-09-2019

Hi ,

If you want to store 8 bytes only you can create a 8 byte array and fetch the data into that array every time as a local variable.

otherwise if you are willing to store 200 bytes data use static buffer locally of size 200 and track number of bytes filled in the fifo or as a index you can use static variable so that you can track the number of bytes received and data as well.

Regards,

Venu

0 Kudos
Highlighted
Contributor
Contributor
225 Views
Registered: ‎10-24-2018

Thanks. I am able to do this.

But if i am sending 8 byte of data (my fifo threshold size is 8 and i am getting interrupt twice. Why? I should get interrupt one..right??

 

0 Kudos