Skip to content

sp1 board def - #11261

Open
FoamyGuy wants to merge 3 commits into
adafruit:mainfrom
FoamyGuy:sp1_board_def
Open

sp1 board def#11261
FoamyGuy wants to merge 3 commits into
adafruit:mainfrom
FoamyGuy:sp1_board_def

Conversation

@FoamyGuy

Copy link
Copy Markdown
Collaborator

I tried to contain it as much as possible to the board specific folder.

board_early_init() is a new addition that I tried to avoid, but I think is necessary. The bootloader on this device reads buttons using the SAADC and leaves it enabled. My understanding is that this would cause problems before board_init() is run so a new hook needed to be introduced that is earlier than board_init().

Feeding the watchdog during a first boot before it starts to format the flash filesystem is important as well. Formatting takes long enough that the dog would bite during if it were not first fed until board_init().

This branch is currently untested on hardware. Submitting it now as a draft to open it up for feedback. I am working next on making a local merged branch that includes this board def along with the changes from the other separated PRs to get a build to validate the functionality on hardware.

@FoamyGuy

Copy link
Copy Markdown
Collaborator Author

The latest commit brings back board_wdt_feed() from the original PR. I believe this or something similar is necessary because we need to feed the watchdog during the initial filesystem formatting which lasts for longer than the watchdog interval is set for.

it uses board_wdt_feed() and not board_background_task() because the latter also checks the for the power off button sequence in addition to the watchdog feed. During the filesystem format (and emmcio transactions) the watchdog needs to be fed but we do not want the device to get powered off while those are occurring.

…ort for 16 bit magic, disable CIRCUITPY_SDCARD_USB on SP-1
@FoamyGuy

FoamyGuy commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator Author

The latest commit fixes the compile error from a missing #ifndef in mpconfigport.h. I confirmed that SP-1 builds and I did a smoke test build/flash of CircuitPlayground Bluefruit to ensure nothing in this branch breaks other boards. Have not tested this branch on the SP-1 device yet, getting closer to being able to do that. More changes might shake out once I do get on hardware.

It also brings in the microcontroller.on_next_reset bootloader support for 16 bit wide magic value. This was in the origina PR, but was missing from this one. It is required in order for this device to be able to enter bootloader via the REPL with microcontroller APIs.

@FoamyGuy
FoamyGuy marked this pull request as ready for review August 28, 2026 01:35
@FoamyGuy

Copy link
Copy Markdown
Collaborator Author

I've done a successful basic test of this branch the SP-1 device now. Initial flash, REPL, LEDs, buttons, a faders are all working as expected. Have not tested audio or emmc with this branch on SP-1 yet.

There will need to be some reconciliation between this branch and the emmcio module branch once one or the other is merged. Both this branch and the current emmcio module PR branch have been intentionally separated so as not to rely on each other. But there is still some code needed for using both together. The original PR has code inside of emmcio that is responsible for feeding the watchdog. That needs to come back but it needs to be in a branch where both exist.

I'll pick up testing tomorrow with locally merged branches and try out audio and emmc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant