I m working on an nRF52840 µc ,the µc will be woken up every 3 hours and i have to save a data(4bytes) into a tab[16] so i can send those 16 values later after 2 days.
when the µc (nRF52840) is passing into sleep mode how can we save Data that we want to use later when he's up?
331 Views Asked by Khalil Soltani At
1
There are 1 best solutions below
Related Questions in C
- Passing arguments to main in C using Eclipse
- kernel module does not print packet info
- error C2016 (C requires that a struct or union has at least one member) and structs typedefs
- Drawing with ncurses, sockets and fork
- How to catch delay-import dll errors (missing dll or symbol) in MinGW(-w64)?
- Configured TTL for A record(s) backing CNAME records
- Allocating memory for pointers inside structures in functions
- Finding articulation point of undirected graph by DFS
- C first fgets() is being skipped while the second runs
- C std library don't appear to be linked in object file
- gcc static library compilation
- How to do a case-insensitive string comparison?
- C programming: Create and write 2D array of files as function
- How to read a file then store to array and then print?
- Function timeouts in C and thread
Related Questions in EMBEDDED
- PHP don't use temp file for upload
- Sparkfun SC16IS750 does not work on Raspberry Pi
- Reserve memory space in m_text memory region of FLASH on embedded target
- SAE J1939 Standards Collection -- How much is necessary?
- How to call multiple slaves for Spi data transmission?
- Deployment over GPRS to embedded devices
- Changing just one byte in SD card sector
- Comparion of values won't work without delay
- Better to pass struct, or pointer to struct?
- STM32F4 Handling peripheral error while making a DMA Transfer (RX)
- USB programming, transfer file from iOS device to Embedded os device?
- using Diab, dcc 5.9.4 to compile a windows executable
- does b64_pton() work if input contains special characters? I am using it in C code
- u-boot select boot partition based on GPIO state
- Why is a write to a memory-mapped peripheral register not actioned (LPC43xx)?
Related Questions in NRF52
- TRF7970: Mifare Classic authentication
- nRF SDK: BLE GATT server and interrupts at the same time not working
- NRF52832 BLE device discovery issue
- nrf52832 Zephyr h5 hci uart stacking error occures when the connection is created between the controller and the nrf52
- Nordic Toolchain Manager initializing environment forever
- Is it possible to have a NRF52 GPIO pin that set/cleared using two GPIOTE tasks respectivly
- How can one debug a Zephyr RTOS application which crashes only with the debugger detached?
- Android App receives 2 connections from the same device (nRF Module)
- How to access the child nodes in a device tree (DTS) in Zephyr using DT_FOREACH_CHILD
- Does Zephyr support sending non-IP traffic over 802.15.4?
- HCI_UART on NRF52840, attaching the device on a Yocto based Linux SBC errors out saying "Can't init device hci0: Cannot assign requested address (99)"
- support in Developing Code For TMG4903 sensor from AMS with Nordic 52 series
- NRF52 How to erase a protected firmware program (knowing the protected password)
- Beginner setup of a nrf52840 dongle
- No RTC pin signals with SparkFun nRF52832 Breakout
Related Questions in SEGGER-JLINK
- “RAM check failed” when using j-Link to erase chip or readback
- How to turn on LED on stm32 board using assembly language that generated by llvm?
- JTAG Daisy chain debugging using eclipse
- Breakpoint aren't toggled in Vscode, Redboard Artemis with J-link
- Using IAR Embedded Workbench to configure an Arduino Due through J-link, the debugger never reaches the main function of my C-Code
- Using FLM file in MDK (Keil Uvision) to flash external SPI FLASH via JLink
- Setting CPU registers from JLINK script (Cortex-M4) wih a value rm RAM
- how jlink working when load elf and handling
- Why does nothing happen when i choose j-link in Segger SystemView?
- Core can't be identified in uVision, but commander works fine
- How can I flash the NXP S32K148 using J-Link?
- How can I debug what is going wrong with a jump from one application to another in STM32G4?
- Atmel studio does not work tool window for release or debug mode selection
- install Jlink under FreeBSD
- Segger J-Link (or i-jet) with Renesas R-Car H3 and IAR
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Not familiar with the part but looking at the reference manual, the on-chip RAM is static meaning that it will retain its value so long as the power supply is maintained - even in sleep modes or through a reset. You would need to set-up the link map and start-up code to avoid initialising the reserved area on start-up.
Alternatively, the 256K flash memory is divided into 4K erase-block pages, you could reserve an entire page (i.e. set the link map to avoid locating code there). The flash endurance is only 10000 erase cycles, but even if you erases the block every two days, it would last >54 years. Since you are writing a data block of only 64 bytes you could write the blocks sequentially through the 4K such that the highest addressed non-blank block of 64 bytes is the current data; then you need only erase the page once it is entirely full, extending the endurance to 3500 years.
Note however that the flash as some restrictions:
That is to say you can write say 0xFFFFFF00, then 0xFFFF00FF, and the word would then contain 0xFFFF0000, but you could not then write the upper two bytes of that word.
Another issue with using the Code Flash is that while erasing, the bus stalls and instructions cannot be fetched. That means your code stops running. This scan be a serious issue in real-time systems; but given that your system sleeps for 3 hours at a time, presumably there are no critical micro-second level timing deadlines?
Another possibility offered by part is the UICR (User information configuration registers), a special area of non-volatile memory that includes 32 words (128 bytes) of customer defined data. However that is perhaps not very practical for dynamic storage since the area contains Nordic reserved words and device configuration, and like regular flash memory an erase deleted the entire UICR, so you would necessarily copy the data before erase and rewrite it. Not really power fail safe. The endurance is still 10000 erase cycles, if you striped it like above, having only 128 bytes would extend the endurance to 20000 cycles or 109 years erasing every 4 days.
Beyond those possibilities an off-chip NV memory device such as an EEPROM, FRAM, Flash, or even and SD/MMC card (with a filesystem). These can be attached via one of the available SPI, I2C (TWI) or QSPI interfaces. Whist likely to have higher endurance than the on-chip flah, that may still be a consideration for some devices. FRAM has no endurance issues, and SD cards are so capacious that it is unlikely to be an issue in the application described.