-
-
Notifications
You must be signed in to change notification settings - Fork 7
Description
We'll need to implement an SPI flash driver for EV3 so we can load programs on boot and save them during shutdown.
This is very similar to the existing implementation for SPIKE Prime., just with a different set of SPI commands.
We also already have SPI1 working with DMA for the display. Flash uses SPI0 with CS0. SPI0 is also used with CS3 for the ADC, for which we already have code as well. But since we only use flash on boot and during shutdown, we don't need to switch between them at runtime. This makes it relatively easy since it is consistent with existing Pybricks hubs, but the original EV3 firmware did this too.
The necessary Flash SPI commands and parameters can be found in the original firmware and u-boot or just from the data sheet, so everything is out there in principle.