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

Entering BusFault_handler when checking NRF_NVMC->READY

Hello,

When line 10 of the below code is executed the system enters the BusFault_Handler, at this point the NVMC register is as followed: Ready = 0x00000001, Config = 0x00000001, the rest of the register is set to 0's.

1:  NRF_NVMC->CONFIG = (NVMC_CONFIG_WEN_Wen << NVMC_CONFIG_WEN_Pos);
2:
3:  while (NRF_NVMC->READY == NVMC_READY_READY_Busy)
4:  {
5:     /* Do nothing. */
6: }
7:
8: *address = value;
9:
10: while (NRF_NVMC->READY == NVMC_READY_READY_Busy)
11: {
12:   /* Do nothing. */
13: }
14:
15: // Turn off flash write enable and wait until the NVMC is ready:
16: NRF_NVMC->CONFIG = (NVMC_CONFIG_WEN_Ren << NVMC_CONFIG_WEN_Pos);
17:
18: while (NRF_NVMC->READY == NVMC_READY_READY_Busy)
19: {
20:   // Do nothing.
21:}

Any idea why this is happening?

Thanks

Related