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

About sd_flash_write function - 0xFF evaluation & delay time

Hi guys,

I have some questions about sd_flash_write function:

  1. Will sd_flash_write() evaluates if the input value is 0xFF so that it won't need to perform an unnecessary write?

  2. If there is no 0xFF evaluation, would it be faster to write 0xFF than to write other value?

  3. How long would it take to write 256 words at a time using sd_flash_write() function? Would it cause any great side effect? How about the erase time (1 page of 256 words)?

I'm using SD s110 v7.0.0 on nrf51822 chip.

Thank you for any help!

Parents
  • @Chd:

    1. No, I don't think we have that check in our code in the softdevice.

    2. I don't have the exact amount of time for writing 0xFF, what we have is the maximum timing , which is 46.3us for writing a 32bit word from flash.

    3. You would need to consider the blocking time by the softdevice's radio activity. So it will be 256x46.3 + blocking time. The blocking time is depend on the number of BLE packets have to be transmitted, and if there is any other activity that has higher priority that the flash operation. The erase time is also defined in the spec, which is 22.3ms. But the erase command also have to be scheduled and the scheduler is dependent on the BLE activity.

    You should implement a check for the flash call back event (NRF_EVT_FLASH_OPERATION_ERROR, NRF_EVT_FLASH_OPERATION_SUCCESS) in the system event instead of rely on the timing.

  • So the max time to write a page would be around 11.8ms which is smaller than erase time. Not a big deal for my app, I guess. Anyway, thank you Hung!

Reply Children
No Data
Related