I can get an interrupt on every character by setting the rxfifo_full_thresh value to 1.
If I leave the rxfifo_full_thresh value high (100), I can also get a rx_timeout_thresh = 1 to interrupt (as soon as the rx character stream stops).
I can't get both to occur with any configuration. It seems like as soon as I get the rxfifo_full interrupt, it disables the timeout interrupt feature. Interrupt mask is definitely still set after my rxfifo_full interrupt happens.
I really need to send my reply packet as soon as I get the first character (context in the protocol is important).
The timeout function is very useful to indicate the end of the packet so I can process it before another one is started.
Any hints on how I can get both interrupts to work?
Thanks!
UART interrupts: First character and Timeout at the same time doesn't work
Re: UART interrupts: First character and Timeout at the same time doesn't work
I found a way to make this work.
Initially set up the interrupt for RXFIFO_FULL_THRESH = 1 and RXFIFO_TOUT_THRESH = 1.
I then get an interrupt on the first character where I change the RXFIFO_FULL_THRESH = 128 so the Timeout interrupt can happen.
I read characters into my buffer on both interrupts and do a flush() on the timeout interrupt after reading my characters.
Initially set up the interrupt for RXFIFO_FULL_THRESH = 1 and RXFIFO_TOUT_THRESH = 1.
I then get an interrupt on the first character where I change the RXFIFO_FULL_THRESH = 128 so the Timeout interrupt can happen.
I read characters into my buffer on both interrupts and do a flush() on the timeout interrupt after reading my characters.
Who is online
Users browsing this forum: Bing [Bot], ok-home and 100 guests