PicoBoot
PicoBoot copied to clipboard
Debug LED behavior
Current behavior:
The builtin LED is enabled during boot up and doesn't provide any sensible information apart from the fact that PicoBoot code is flashed correctly.
How can we improve?
Use the LED to signal diagnostic information. It can use different blinking patterns to differentiate a few things:
- CS data line missing
- CLK data line missing
- MISO data line missing
- MOSI data line missing (not used in current impl.)
Blinking patterns
| Scenario | Blinking pattern | Description |
|---|---|---|
| All OK | * * * * * |
5 short pulses |
| CS data line missing | - * * * * |
1 long, 4 short pulses |
| CLK data line missing | - - * * * |
2 long, 3 short pulses |
| MISO data line missing | - - - * * |
3 long, 2 short pulses |
| MOSI data line missing | - - - - * |
4 long, 1 short pulse |
- After 5 long pulses ("All OK") the LED should turn solid green for the rest of operation
- In case of error patterns should repeat indefinitely with a longer pause in between
Maybe another option is to use some GPIOs to output a status byte, and let people connect LEDs to them?