[Trac #988] EC code, putchar XON/XOFF handling and crlf conversion
Zarro Boogs per Child
bugtracker at laptop.org
Mon Mar 5 16:42:37 EST 2007
#988: EC code, putchar XON/XOFF handling and crlf conversion
---------------------------------+------------------------------------------
Reporter: frief | Owner: ray.tseng at quantatw.com
Type: defect | Status: new
Priority: normal | Milestone: Untriaged
Component: embedded controller | Keywords: EC uart serial watchdog
---------------------------------+------------------------------------------
the EC code (at the beginning of Olpc-Q2B73.rom) seems to
contain and use putchar code for the UART of the embedded
controler.
While probably not a bug itself I'm not convinced that
a lowest level output routine should do a crlf conversion,
and that it should do XON/XOFF handling the way it does.
If 0x13 should have been received the code would block
until 0x11 is received in the loop at 0xb245..0xb24e.
A minor glitch: within the XON/XOFF handling the ri
serial flag is conditionally reset (at 0xb244).
I'd have expected the ri flag to be reset directly after
reading sbuf (as it is done after reading sbuf at 0xb248).
{{{
-----8<---------------------------------------
putchar:
mov a,r7
cjne a,#0ah,Xb23b
mov a,#0dh
lcall Xb23b
mov a,#0ah
Xb23b: jnb ri,Xb24f
mov r0,sbuf
cjne r0,#13h,Xb24f
clr ri ; xx not always reset!
Xb245: jnb ri,Xb245
mov r0,sbuf
clr ri
cjne r0,#11h,Xb245
Xb24f: jnb ti,Xb24f
clr ti
mov sbuf,a
ret
----->8---------------------------------------
}}}
Would a watchdog have bitten within the
potentially endless XOFF/XON handling?
Greetings,
Frieder
--
Ticket URL: <http://dev.laptop.org/ticket/988>
One Laptop Per Child <http://laptop.org/>
More information about the Bugs
mailing list