annotate bwsplash/README @ 220:0ed36de51973

ABB semaphore protection overhaul The ABB semaphone protection logic that came with TCS211 from TI was broken in several ways: * Some semaphore-protected functions were called from Application_Initialize() context. NU_Obtain_Semaphore() called with NU_SUSPEND fails with NU_INVALID_SUSPEND in this context, but the return value wasn't checked, and NU_Release_Semaphore() would be called unconditionally at the end. The latter call would increment the semaphore count past 1, making the semaphore no longer binary and thus no longer effective for resource protection. The fix is to check the return value from NU_Obtain_Semaphore() and skip the NU_Release_Semaphore() call if the semaphore wasn't properly obtained. * Some SPI hardware manipulation was being done before entering the semaphore- protected critical section. The fix is to reorder the code: first obtain the semaphore, then do everything else. * In the corner case of L1/DSP recovery, l1_abb_power_on() would call some non-semaphore-protected ABB & SPI init functions. The fix is to skip those calls in the case of recovery. * A few additional corner cases existed, all of which are fixed by making ABB semaphore protection 100% consistent for all ABB functions and code paths. There is still one remaining problem of priority inversion: suppose a low- priority task calls an ABB function, and some medium-priority task just happens to preempt right in the middle of that semaphore-protected ABB operation. Then the high-priority SPI task is locked out for a non-deterministic time until that medium-priority task finishes its work and goes back to sleep. This priority inversion problem remains outstanding for now.
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 26 Apr 2021 20:55:25 +0000
parents a963d8cd8682
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
195
4d9f24c501f3 bwsplash: simple splash screen for FreeCalypso Lite (smallbw)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 When TI's original version of small B&W UI firmware boots or shuts down, the
4d9f24c501f3 bwsplash: simple splash screen for FreeCalypso Lite (smallbw)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 splash screen it displays consists of a 56x38 pixel B&W TI logo centered in the
4d9f24c501f3 bwsplash: simple splash screen for FreeCalypso Lite (smallbw)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 middle of the LCD. (Back when this code was owned by Condat rather than TI,
4d9f24c501f3 bwsplash: simple splash screen for FreeCalypso Lite (smallbw)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 this splash screen was an animated Condat logo of approximately the same size -
4d9f24c501f3 bwsplash: simple splash screen for FreeCalypso Lite (smallbw)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 it is still present in the code, conditioned out.) Because we are FreeCalypso
4d9f24c501f3 bwsplash: simple splash screen for FreeCalypso Lite (smallbw)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 and not TI or Condat, we need our own logo or at least our own splash screen to
4d9f24c501f3 bwsplash: simple splash screen for FreeCalypso Lite (smallbw)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 replace those other company logos.
4d9f24c501f3 bwsplash: simple splash screen for FreeCalypso Lite (smallbw)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8
4d9f24c501f3 bwsplash: simple splash screen for FreeCalypso Lite (smallbw)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 A bona fide FreeCalypso logo does not exist yet as of this writing (2021-03),
4d9f24c501f3 bwsplash: simple splash screen for FreeCalypso Lite (smallbw)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 and while we (Falconia family that owns FC) do have some logo ideas in the
4d9f24c501f3 bwsplash: simple splash screen for FreeCalypso Lite (smallbw)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 works, the 96x64 pixel B&W (1bpp) framebuffer in the FreeCalypso Lite config is
4d9f24c501f3 bwsplash: simple splash screen for FreeCalypso Lite (smallbw)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 far too limited compared to other media - hence we are currently going for a
4d9f24c501f3 bwsplash: simple splash screen for FreeCalypso Lite (smallbw)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 simple splash screen that merely consists of the words "FreeCalypso Lite".
4d9f24c501f3 bwsplash: simple splash screen for FreeCalypso Lite (smallbw)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14
4d9f24c501f3 bwsplash: simple splash screen for FreeCalypso Lite (smallbw)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 The current version of our minimal-effort splash screen is 80x30 pixels, to be
4d9f24c501f3 bwsplash: simple splash screen for FreeCalypso Lite (smallbw)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 centered in the middle of the 96x64 pixel LCD. The bitmap drawing is given in
4d9f24c501f3 bwsplash: simple splash screen for FreeCalypso Lite (smallbw)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 bwsplash.pbm, which is a Plain PBM file, making the pixel image directly
197
a963d8cd8682 bwsplash/README: additional notes
Mychaela Falconia <falcon@freecalypso.org>
parents: 195
diff changeset
18 viewable and editable in vi. The tools in this directory compile it into hex
a963d8cd8682 bwsplash/README: additional notes
Mychaela Falconia <falcon@freecalypso.org>
parents: 195
diff changeset
19 bytes for inclusion in C source, and the finished artifact goes into
a963d8cd8682 bwsplash/README: additional notes
Mychaela Falconia <falcon@freecalypso.org>
parents: 195
diff changeset
20 src/ui/bmi/mmiIcons.c, fc_splash_screen_smallbw[] char array. The coordinates
a963d8cd8682 bwsplash/README: additional notes
Mychaela Falconia <falcon@freecalypso.org>
parents: 195
diff changeset
21 for positioning this bitmap within the full 96x64 pixel framebuffer are given
a963d8cd8682 bwsplash/README: additional notes
Mychaela Falconia <falcon@freecalypso.org>
parents: 195
diff changeset
22 in src/ui/bmi/mmiResources.h - look for WELCOME_ANI_POS_X and WELCOME_ANI_POS_Y
a963d8cd8682 bwsplash/README: additional notes
Mychaela Falconia <falcon@freecalypso.org>
parents: 195
diff changeset
23 definitions.
a963d8cd8682 bwsplash/README: additional notes
Mychaela Falconia <falcon@freecalypso.org>
parents: 195
diff changeset
24
a963d8cd8682 bwsplash/README: additional notes
Mychaela Falconia <falcon@freecalypso.org>
parents: 195
diff changeset
25 The present splash screen is strictly a minimal-effort job with absolutely no
a963d8cd8682 bwsplash/README: additional notes
Mychaela Falconia <falcon@freecalypso.org>
parents: 195
diff changeset
26 quality claims of any kind. If someone is more graphically talented than I am,
a963d8cd8682 bwsplash/README: additional notes
Mychaela Falconia <falcon@freecalypso.org>
parents: 195
diff changeset
27 or has more time to invest into drawing a prettier splash screen, suggestions
a963d8cd8682 bwsplash/README: additional notes
Mychaela Falconia <falcon@freecalypso.org>
parents: 195
diff changeset
28 for improvement are always welcome.