Status of TCS211 on C139

Mychaela Falconia falcon at ivan.Harhan.ORG
Thu Nov 5 09:47:04 CET 2015


So I tracked down the bug that made tcs211-c139 fw reboot endlessly
when LCD output is enabled: it appears to be a race condition bug that
was present all along in TI's official reference fw, but got unmasked
by the timing differences caused by our LCD driver having to transmit
84x48 pixels at two bytes per pixel (as opposed to 8 pixels per byte
with the strictly monochrome LCD on TI's C-Sample) over uWire serial
interface.  The race condition is with L1TM calling etm_register()
(from the L1A task) to register its test mode interface before the ETM
Riviera entity has been initialized to a point where it can handle
these calls.  I implemented a band-aid fix which you can see in the
source repository.

The next issue was that the output on the LCD was total garbage.
After another hair-tearing head-scratching session, I was able to
figure out that the display.c module in the gdi library was still
being compiled for the D-Sample LCD config, rather than C-Sample.
After fixing things so it builds in the C-Sample config for real this
time, it became evident that the C-Sample LCD config is bitrotten in
the D-Sample & Leonardo-targeting TCS211 source we got: it wouldn't
even pass the build at first, as it was calling an R2D function which
is no longer there.  Then I tweaked a couple more things to get it to
compile and link.

The current status of tcs211-c139 is that if you compile the current
code and flash it into your C139, you will get a semi-working phone:
there is a UI on the LCD (albeit a defective one, see below), you can
unplug the phone from the serial cable, and you can still make and
receive phone calls via the LCD & buttons UI.  However, the UI is
currently unusable because of some remaining bugs in the bitrotten
C-Sample display code: what one sees on the LCD is a mixture of the
expected output and garbage.  The garbage part makes it unusable.

You can find the booty here:

https://bitbucket.org/falconian/tcs211-c139

DS is probably the only person besides me who already has a Wine
environment with TI's stuff set up for building TCS211-based fws - I
encourage you to give this fw a try so you can see for yourself how
far along we are.

Going forward, we need to find and fix the bug that leaves garbage on
the LCD - we need to fix this issue before C139 with this fw will
become usable.  And that in turn will require actually understanding
this *horribly* messy display output code path...  It'll probably take
me a while.

Happy hacking,
Mychaela


More information about the Community mailing list