This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

sd_flash_write halts

Hi,

On SDK12.3 when using sd_flash_write at any memory location causes the device to halt and restart.
On SDK11 I've been using flash_word_write and flash_page_erase using the NRF_NVMC registers, and it worked flawlessly.
But I can't seem to figure out what is the issue with SDK12.3.
I've read that using NRF_NVMC with the softdevice is not allowed.
I've been writing to NRF_FICR->CODEPAGESIZE * (NRF_FICR->CODESIZE - 1) previously and that always worked.
But is there a way to reserve a page of flash to which I can store my custom data structure and modify it in the firmware without using fds?
I've tried making a const char array of a size and then writing to its pointer, but that didn't work. If I know my application code is less than 32k, can't I just write anything after the 32k mark?
I also have a softdevice and bootloader.

Edit:
I'm currently using SDK12.3 and I can't migrate it to a newer version, but the question applies for newer SDK too.

Parents Reply
  • I have:
    fsdata[0]=123;
    retco(fs_store(&fs_config, (uint32_t*)MEM_ADDR, fsdata, 1,NULL));
    where retco just prints me out the result.
    I fixed the FS_ERR_QUEUE_FULL problem, but now it only works when MEM_ADDR is 0x007F000 which is exactly where the DFU bootloader is supposed to go. So how do I make it working in the 0x0001F000 - 0x0007D000 range where the application+application data storage is located by the nrf memory map without getting a FS_ERR_INVALID_ADDR  error?

Children
Related