I'm developing with the NRF52840 using IAR Embedded Workbench, and implementing wireless communication based on the IEEE802.15.4 Zigbee protocol.
In the MAC frame layer of IEEE802.15.4, there is a field called Sequence Number, which is used to identify the continuity and uniqueness of transmitted packets. I'm currently struggling with how to implement this.
In this development, the device uses the Deep Sleep feature, which means the Sequence Number needs to be retained even when the device is stopped. I have the following ideas for software and hardware design:
- Store the Sequence Number in the flash memory of the NRF52840. However, due to concerns about the limited number of write cycles, this approach may be difficult unless the write location is carefully managed.
- Add an external EEPROM to store the Sequence Number. But from a power-saving perspective, I would prefer to minimize the use of external devices.
What would be the most reasonable way to store the Sequence Number on the NRF52840?