Using the SPI Flash

Hi,

I have been trying to use the Paul Soffregen Serial Flash library (GitHub - PaulStoffregen/SerialFlash: Library for using SPI Flash memory with a filesystem-like interface) with this board but I can’t get it to create a file.

I’ve followed what I think is the correct process, and with investigation, it appears to get to the check_signature function within this code and this fails. According to the wiring diagram, this serial flash is not one of the tested ones, but is very similar and I wondered if anyone got this library to work with the MKRWAN 1310?

Secondly, can anyone suggest where I might have gone wrong with my code?
The program is quite complex as I am trying to prove Serial Flash with watchdogs and timers, I intend to add LoRa into this once it is working at this level, hence lots of extra bits there that may not be completely necessary at this time.

DebugDataCapturing.ino (8.84 KB)

The first step I would recommend is to reduce your "quite complex" program to the shortest necessary to duplicate the problem. It is possible (even likely) that the extra stuff is conflicting in some way.

This also makes it easier for forum volunteers to read and understand your program, and to spot the problem.

Hi mshiloh,

I have reduced the quite complex script to a simple one without any success. It appears to create & write a file, but when I re-run it, the read directory function doesn’t report any results.

I have also tried the list files example, (SerialFlash/examples/ListFiles at master · PaulStoffregen/SerialFlash · GitHub)

this also returns no results, so I can only assume no file has been created.

I am at complete loss as to what to do next.

DebugDataCapturing.ino (5.28 KB)