[OpenTRV-dev] Puzzling long-term bugs
damon at opentrv.uk
Thu Sep 29 08:33:53 BST 2016
The UART clocks being out relative to one another is in my view quite likely an issue since on our board’s side the clock is derived from the AVR’s 8MHz internal RC clock.
This does mainly seem to be an issue with solid blocks of characters (eg ~16 or more bytes) being sent at once (to the AVR board), though I would expect everything to resync on each start bit.
I don’t believe any buffers are being overwritten since we are using the normal Arduino queued serial byte streams, with everything interrupt driven, though that may be worth another look, thank you.
> On 28 Sep 2016, at 17:11, Jeremy Poulter <jeremy at bigjungle.net> wrote:
> Is this more than just UART being UART and the clocks of of each side being out?
> Maybe try repeatedly sending 'U' on one of the problematic devices and measure the frequency, should be half the baud rate as U is 01010101
> IIRC you use a relatively slow baud rate (4800 IIRC) so you could be overwriting data in a buffer if you send data to fast?
> On 28 Sep 2016 3:08 p.m., "Damon Hart-Davis" <damon at opentrv.uk> wrote:
> We have a Wiki page here for our general amusement:
> We’ve certainly been having some puzzlement while putting together a small run of valves for a trial over the last few days. Could be summarised as ‘dodgy serial’:
> - Some REV7 and other V0p2 units seem to have problems with serial RX and TX, garbling some characters
> - Seems especially problematic for longer (16+?) blocks of characters such as setting a key
> - Have tried to ensure no sleeping or other fiddling with CPU clock during UART operation
> - Seems to apply to a few % of REV7, REV10 boards at least
> - It has been possible to load a large (30KB) app over serial with the bootloader.
> Any ideas welcome!
> OpenTRV-dev mailing list
> OpenTRV-dev at lists.opentrv.org.uk
More information about the OpenTRV-dev