SAMR34 - implementing LoraWAN persistence on RWWEE flash

Hello, I'm using SAMR34 Xpro for prototyping software for a low power (energy harvesting) LoRa node.

While the current semtech_lorawan works perfectly fine, it only provides support for serializing lorawan_mac state to EEPROM. So, at present I need to join the LoRaWAN network each time I wake up from the chip "backup mode".

The SAML21 CPU does not have an EEPROM, but it does have an NVM flash with a few RWWEE pages. One of those pages can easily be used for storage.

I have already implemented the data serialization I need, but the network join state is not directly accessible outside semtech-loramac - so it can't be restored unless I put my stuff straight into the package.

Will that integration make any sense as a contribution to you? Or should I rather strive for a generic EEPROM emulator on top of RWWEE?

Thanks for any advice,

Antonio

Another approach, simpler but somewhat less clean, is to define a suitable semtech_loramac_set_join_state - that way the entire state could be restored without problems.

Antonio