We’re in the early stages of redesigning an existing product to add IoT by replacing our main MCU with a P1.
I’ve read through the P1 data sheet and a fair amount of the firmware repository and I just want to confirm my interpretation of flash usage.
From my reading, the P1 has all of its program flash storage on the 1MB internal memory-mapped flash (at least that’s what the P1 memory map seems to indicate) on the STM32 part and none on the external 1MB SPI-connected MX25L8006E part.
Yes, you are correct. There is 1 MB of flash on the STM32F205 processor and another 1 MB on the SPI flash MX25L8006E which is inside the P1 module but outside the STM32 processor.
There are some comments in this source about loading from external flash because that’s how the Spark Core, which preceded all of the current devices, worked. It used as STM32F105 processor that did not have internal flash, and thus the external flash was required.
The Photon and Electron do not have external SPI flash and use only the STM32F205 internal flash.
One of the best ways to take advantage of the P1 external flash is the flash-eeprom library.
The external flash is not used at all by the system firmware, mainly because it’s only on the P1 and not on the Photon or Electron, so you’re free to use it for whatever you want.
There is no built-in way to update the external flash OTA at this time. You can access it from user firmware so you can use other techniques for loading it, like HTTP or FTP, but there is no built-in support for OTA at this time.