Sorry Andy - I totally missed your post.
Thanks for trying to reroduce this with sample data simialr to my own. I'm not surprised you didn't see anything wrong.
I've enabled the Line Status Interrupt in your buffered class & I'm logging errors - well I think I am but I'm not seeing any reports of framing/parity/overflow/break errors. Absence of evidence is not evidence of absence but it's consistent with it working OK.
Looking at the data captured some more & it's clear that bit slip would only account for the first few characters - after a while it's all brown stuff The capture below show this: the 1st column increments from 0x0 to 0xF, the rest are zeros. If you write these down as bit stream as they appear on the line then bit slip can' explain this:
00,00,00,00
01,00,00,00
02,00,00,00
03,00,00,00
04,00,00,00
05,00,00,00
06,00,80,80
10,10,10,10
08,08,08,28
08,08,08,48
08,28,08,68
08,08,04,04
04,04,04,14
04,04,04,24
04,04,04,34
04,04,04,84
I'm scraping the bottom of the barrel & have two q's:
1) is the UART implemented in software or hardware ?? If it's software I'm wondering if I'm being starved by doing other stuff (SD i/o)
2) There's every chance that this board has been plugged straight into the serial lines & would have seen +/-7V on UART 1 & 2 pins. Could this cook it ??
Cheers again
Update: THe logger is teed (if that's a word) in between 2 devices - both of which are logging to hyperterm what they're saying/hearing. Neither has an issue - both tx & rx expected data. There's no flow control.
Hi All,
I've implemented a serial logger capturing data on UARTs 1 & 2 (both 4800:even:1stopbit) & it appears to be experiencing bit slip on UART2 (possibly UART1 but I've not really checked as most of the data comes in UART2).
After 32 or 33 (& always 32 or 33) characters received correctly, the logger records 0x80 where 0x00 should be, 0x8E where 0x1C should be, etc.; for the next 7 characters.
It then records 0x40 where 0x00 should be, 0x47 where 0x1D should be. Again for 7 characters.
This error is not seen when the mBed is generating it's own test data (on UART1 tx pin), only when it's capturing on the actual system.
Would it be possible to look at the serial class implementation ?? Also is this a hardware or a software UART ?? It looks like the UART is not framing properly - hence why 0x00 appear as 0x80, then 0x40 (it's even parity).
I'll be very happy to sign NDA's & the like.