Hi Sten, Thanks for your reply. Yes, this is what I'm doing now with the PIC chip and was expecting to have to do on the Arm. As I'm new to it, I wasn't sure if there was a neater way to do it. I moving (Trying to) to the Arm for more Grunt. Cheers, peter Sten wrote: > Peter Homann wrote: > >>Hi, >> >>I am migrating a serial communications interface (Modbus) to a LPC2138 >>processor. The Modbus spec defines that an end of message has occurred >>when a period equal to 3.5 characters has passed since the last >>character has been received. >> >>The LPC uart can generate an interrupt if the receive buffer has >>characters in it and no character has been received for a period of 3.5 >>- 4.5 characters. >> >>I would like to use this feature for detecting the end of a received >>message. The problem I have is that if I service an interrupt due the >>the buffer being filled, and it also happens that that last character in >>the buffer was the last character for the received message, the receive >>time-out interrupt will not occur, resulting in the end of message not >>being detected. >> >>Is there a solution, other than using a buffer length of 1 and using a >>timer to measure the inter message gap? >> >>Cheers, >> >>Peter. >> > > > Hello Peter, > > this interrupt was not designed for your needs. It should prevent a > communication from being stalled if some characters are trapped in queue > which is not full. > Just an idea: every time you receive a character reset a timer. If a > timer interrupt occure prior a line idle interrupt, you have not > received any characters for a certain time. It's ugly but should solve > your problem. > > Sten > -- ------------------------------------------------------------------ Web: www.homanndesigns.com email: homann@... Phone: +61 421 601 665 www.homanndesigns.com/ModIO.html - Modbus Interface Unit www.homanndesigns.com/DigiSpeedDeal.html - DC Spindle control www.homanndesigns.com/TurboTaig.html - Taig Mill Upgrade board
Message
Re: [lpc2000] Uart receive timeout Interrupt?
2005-11-09 by Peter Homann
Attachments
- No local attachments were found for this message.