Stopping SerialFlash on MKR WAN

Hi,
I'm trying to make a program that used both the LoRaWAN module of the 1310 and the SPI flash memory for persistent storage between resets.

According to the "Getting started" page for the MKR WAN, the instructions for this are as below:

Accessing the SPI 2MB Flash

To access the memory on the board you can use the Serial Flash library developed by Paul Stoffregen, but you should avoid to access it while the radio module s active. To achieve this you should follow a simple procedure.

To activate the radio modem you use the LoRamodem.begin(); function and to deactivate it to prepare Flash access you need to reset the module with this function: digitalWrite(LORA_RESET, LOW).

You perform your access to the SPI memory - read or write - enclosing it between SerialFlash.begin() and SerialFlash.end().

It is important to follow this procedure to avoid any access to SPI while there is a radio communication ongoing.

However, when I try to use SerialFlash.end(), I get the following result when I try to compile:

'class SerialFlashChip' has no member named 'end'; did you mean 'read'?

Does the end function actually exist or necessary to switch between the two, or is simply reseting the LoRaWAN module enough and restarting the connection enough.

Thanks

I'd also like to add that I'm having trouble writing to the flash as well

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