Status of TCS211 on C139

Mychaela Falconia falcon at ivan.Harhan.ORG
Thu Nov 12 06:30:54 CET 2015


A little bit of progress with tcs211-c139: changing the display handling
glue in g23m/condat/com/src/driver/display.c (glue between Condat's UI
code and TI's R2D) for the emulated C-Sample config to handle the
framebuffer the same way how the D-Sample config does it cured the bug
that manifested in garbage appearing on the LCD, and now the UI display
is readable.

However, the UI itself is still broken / unfinished / not ready for
use in pockets and purses:

* Trying to bring up the LDN (last dialed numbers) list causes the fw
  to crash (reboot); attempting to read all of the stored SMS on my
  test SIM does likewise.  In the case of reading stored SMS, it
  appears that the bug is triggered by either Unicode SMS or
  concatenated ones: "plain vanilla" SMS read fine.  In any case,
  having our fw crash because someone sent us an "ugly" SMS is not
  acceptable, so the bug needs to be tracked down and fixed.

* I can browse through the SIM phonebook, see the names of entries and
  call them, but the UI function that is supposed to display each
  entry as in name and number is not working: shows blanks instead.

* The code that is supposed to show either the clock or some status
  info on the home screen is broken: the clock shows there initially,
  but as soon as you do anything in the UI, the clock line disappears,
  never reappears, and no other status info is displayed in its place
  either.

* The battery gauge display is not working: always shows a full
  battery even when it's near empty.  Firmware-controlled charging
  (beyond the minimal precharge which the hw handles on its own) does
  not seem to work either.  Right now I'm using another C139 (running
  Mot's fw) to charge the battery which I drained in the FC-flashed
  C139.

Given that some of the more basic things listed above are broken, I
have not tried adding a phonebook entry or sending SMS through the UI.
I have not tried sending SMS to the number of the test SIM with this
fw running either: given that it crashes trying to read some stored
SMS, I don't want to confuse it further.  Other than that, a C139
running this fw does work untethered: one can make and receive calls
successfully, as long as you don't try to bring up the list of last
dialed numbers.  But needless to say, the issues listed above are real
show-stoppers, hence they need to be investigated and fixed before we
can even consider this fw for any practical use.

Other quirks:

* Proper backlight control is not here yet.  Like most phones of this
  type, Mot C139 has two separate backlights: one for the LCD and a
  separate one for the keypad.  The LCD backlight must be on for the
  display to be readable (holds true for most color LCDs), hence
  turning this backlight off practically means blanking the display
  from the user's perspective.  However, reasonable battery life as
  well as preserving the life of backlight LEDs requires that all
  backlights be turned off when the phone is idle, so we must blank
  the display after some inactivity.  TI's code turns the Iota-
  controlled LEDB off, but on the C139 (just like on the Pirelli) it's
  the keypad backlight.  The LCD backlight on the C139 is controlled
  by a GPIO pin; right now I turn it on at boot time and it just stays
  on continuously.  Thus display blanking via LCD backlight control
  still remains to be implemented, and its implementation needs to be
  intertied with the keyguard function in the UI in order to be
  suitable for pockets and purses: when the display goes dark, the
  keyguard mode should be activated at the same time.  An absolutely
  necessary function that remains to be implemented.

* Whether Iota LEDB is used for the keypad backlight (as in Mot C139
  and Pirelli DP-L10) or for LCD backlight (possibly on some of TI's
  development boards), it needs to work correctly.  The LEDB circuit
  in the Iota chip requires the 13 MHz clock to be running, and it's
  the clock that is stopped in deep sleep - and deep sleep does work
  without a hitch in this tcs211-c139 fw.  TI's UI fw turns LEDB on at
  boot and upon activity, and turns it off after a period of inactivity.
  However, the code that tells L1 if it should refrain from entering
  deep sleep because of clock-needy backlights is broken and says
  "it's OK to enter deep sleep" even when LEDB is on.  This code checks
  the status of the other kind of backlight which TI apparently used
  on their B and C boards, but not the status of Iota LEDB.

This bug was causing the keypad backlight on the C139 to flicker when
the UI has it turned on and L1 enters deep sleep.  I fixed it so that
whenever LEDB is on, LT_Status() tells L1 to enter big sleep instead
of deep sleep.  Once the UI turns the backlight off, deep sleep is
allowed.

Happy hacking,
Mychaela


More information about the Community mailing list