Page 1 of 1

UART reading timeout

Posted: Sun Mar 27, 2011 1:03 am
by joaquin
I have tried to migrate an rs485 driver to the UART driver, and I haven't found a timeout reading call. I know that it could be done using virtual timers, but it would complicate the code. For Usart models, its fairly straightforward to do.
Am I missing something, or it's just that it has not yet been implemented?
Thanks in advance,
Joaquin

Re: UART reading timeout

Posted: Tue Jun 14, 2011 9:19 pm
by Giovanni
Hi Joaquin,

I have to apologize, for some reason I totally missed this post and failed to answer, it was not my intention to ignore it. Today I accidentally discovered the "View unread posts" option of the board...

Anyway, the UART driver does not implement timeouts and it is meant to be that way, you guess is correct, the best approach is to start a virtual timer and stop the ongoing transfer from the timer callback.

Giovanni

Re: UART reading timeout

Posted: Thu Jun 23, 2011 7:18 pm
by joaquin
Giovanni, thanks a lot. I solved the problem modifying the USART model in Chibios to handle TX/RX pin and it was working properly, but now I'm trying to modify my code to adhere to your standard, so the migration to another version of ChibiOS would be more transparent.