This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Writing multiple words to NVMC

Hello

I have written some code to write the nrf51822 via SWD. It all works, but I would like to make it faster.

I am currently writing one word at a time. If I read the NVMC specification, it says that tWRITE is faster when writing 32 words or more to flash.

That suggests there is a way that allows multiple words to be written at a time.

Is that possible?

  • Hi

    You can only write one word at a time to flash. nRF51822 PS v2.0 section 8.22, table 55, note 1 is probably what you are referring to, right? What is meant is that it will be faster if you write multiple words, one after another. If you write one word, then do something else, then write another word, writing each word will take longer.

    For code refererence, look at ble_flash.c , ble_flash_page_write function.

  • Ok, so I assume this is because there are internal charge pumps or something that take a while to stabilise and if you're writing a lot at a time this takes less time.

    So how much time is allowed between writes to make this fast speed valid?

    I am writing the data via SWD, not via the CPU, so I am not using the functions in the library. Due to the slow gpio pins I am using for the SWD implementation there is about 150uS between writes.

Related