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

how can I write 10kb of flash using a loop with 32bit word write with each iteration

I'm trying to write 32bit word on flash memory every 25ms, but when I read the memory using nrfjprog I noticed that it write only 16 words (32 bits), in this code saveToFlash is set every 25 ms. according to datasheet, time to write is 46us,

why it writes only 16 words? how can I 10kb of memory using a loop?

the code is in the attachement main.c

   while (true)
        {
            if ((*addr > 0x00001000) && (saveToFlash)){
                flash_word_write(addr, flashCounter);
                addr --;
                flashCounter++;
                saveToFlash = false;
            }
        }

image description

Parents Reply Children
No Data
Related