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

NVMC driver wait_for_flash_ready

I have a question about the wait_for_flash_ready routine in the nrf_nvmc.c file.

    static inline void wait_for_flash_ready(void)
{
    while (NRF_NVMC->READY == NVMC_READY_READY_Busy) {;}
}

Can you tell me if this particular while loop can ever get stuck? Does it timeout after a certain time? If so, is there any way to detect that this timed out and the NVM controller was not able to complete the operation?

Parents
  • The chip should never get stuck in that loop. It would be unrealistic to guarantee the chip will 100% operate as it should and will never fail, as you said hardware error can happen. But we haven't got any report from customers about any issue related to that, giving the fact that the chips have been out for 6 years and hundreds of million have been sold. Anyway, you can implement a watch dog timer just to be on the safe side that the device won't brick and can reset if anything happens.

Reply
  • The chip should never get stuck in that loop. It would be unrealistic to guarantee the chip will 100% operate as it should and will never fail, as you said hardware error can happen. But we haven't got any report from customers about any issue related to that, giving the fact that the chips have been out for 6 years and hundreds of million have been sold. Anyway, you can implement a watch dog timer just to be on the safe side that the device won't brick and can reset if anything happens.

Children
No Data
Related