SpiffsParticleRK quick memory check despite void begin()

Hello friends,
I developed a board that contains, among other things, an SD card holder and/or a Winbond flash memory to store collected data that could not be sent.
I am migrating from one to the other memory type.

The software (unique for both) first checks for the presence of the SD card.
If don't succeed, move on to try mount or format the flash memory with begin() and mountAndFormatIfNecessary(), from SpiffsParticleRK.

There are hardware versions with no flash memory but physical failures may occur in the SDCard. In this condition, the software needs to test for the presence of the flash memory, that is not there.
The begin() command does not return success flag and mountAndFormatIfNecessary() fails in an extremely slow formatting attempt.
I tried timeout approaches, but the formatting attempt seemed impossible to interrupt.
Any suggestions?
Thank you very much

The SpiffsParticleRK library doesn't have a function for it because it's in the SPI flash layer, SpiFlashRK. Use the isValid() method of that class, not the SPIFFS class, to determine if the chip is present.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.