Multiple Applications from SD card
Posted: Thu Jun 28, 2018 9:06 am
Hey Guys,
I'm thinking about a method to have multiple different applications to be run from a uSD card.
I had the thought that I have an additional uC (referred to as SMC - System Management Controller) in the design. The SMC has functions anyways, eg providing USB connectivity, managing system power, display, so why not do this also.
Basically the user would use the LCD to select an app to run on the ESP which is the main processor.
I thought about using flash, and reflash every time an app needs to be switched during runtime (SMC can manage this, but it will be slow, and would wear down the fash quickly).
Clearly the flash is not designed for this.
Instead can I use the ESP32 with a PSRAM in the place of the flash?
This is the plan:
- Boot board and SMC, keep the ESP deactivated with CHIP_EN line.
- Copy the first running .bin image to the PSRAM.
- Boot ESP from the PSRAM like you would with the flash, and let the app run.
- When app is switched, the ESP is reset with CHIP_EN and kept disabled
- New bin is copied into the PSRAM
- ESP boots again.
Small schema of the system concerning the ESP and PSRAM
SInce the flash and PSRAM interface is the same, since they are used in parallel, write and read commands are the same, although the Flash implements a ton more other commands to provide write protection, and more wait and dummy cycles.
Is it technically possible? Where should I keep looking for modifying things software wise?
I'm thinking about a method to have multiple different applications to be run from a uSD card.
I had the thought that I have an additional uC (referred to as SMC - System Management Controller) in the design. The SMC has functions anyways, eg providing USB connectivity, managing system power, display, so why not do this also.
Basically the user would use the LCD to select an app to run on the ESP which is the main processor.
I thought about using flash, and reflash every time an app needs to be switched during runtime (SMC can manage this, but it will be slow, and would wear down the fash quickly).
Clearly the flash is not designed for this.
Instead can I use the ESP32 with a PSRAM in the place of the flash?
This is the plan:
- Boot board and SMC, keep the ESP deactivated with CHIP_EN line.
- Copy the first running .bin image to the PSRAM.
- Boot ESP from the PSRAM like you would with the flash, and let the app run.
- When app is switched, the ESP is reset with CHIP_EN and kept disabled
- New bin is copied into the PSRAM
- ESP boots again.
Small schema of the system concerning the ESP and PSRAM
SInce the flash and PSRAM interface is the same, since they are used in parallel, write and read commands are the same, although the Flash implements a ton more other commands to provide write protection, and more wait and dummy cycles.
Is it technically possible? Where should I keep looking for modifying things software wise?