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

Bootloader freezed when NRF_FICR->CODEPAGESIZE was broken

My custom board sometimes freezed on initialization process of bootloader (SDK11 dual_bank_ble_s130) when after long running and reconnect the power. However the symptoms is not all boards but likely around 1 in 10 boards.

I was able to debug the bootloader steps by the following way. devzone.nordicsemi.com/.../

And I found that the NRF_FICR->CODEPAGESIZE was invalid value (0xF6F58FFB). (it's supposed to be 0x00000400)

main.c (bootloader)

leds_init();

// This check ensures that the defined fields in the bootloader corresponds with actual
// setting in the chip.
APP_ERROR_CHECK_BOOL(*((uint32_t *)NRF_UICR_BOOT_START_ADDRESS) == BOOTLOADER_REGION_START);
APP_ERROR_CHECK_BOOL(NRF_FICR->CODEPAGESIZE == CODE_PAGE_SIZE);

Therefore, my questions are:

  1. Are there any possibility to update NRF_FICR->CODEPAGESIZE value in any functionality?
  2. How can I recover this value (NRF_FICR->CODEPAGESIZE)? because in spite of I erased flash and re-flashed all again, I could not start the program if it becomes so.

Any advice and suggestions will be greatly appreciated.

image description

Best regards,

  • Hi Ken, can you read out the all the FICR registers using this command

    nrfjprog --memrd 0x10000000 --n 256 >> ficr_regs.txt
    

    and post the ficr_regs.txt file in your question. I would like to see if the rest of the registers are corrupted.

  • Hi Bjørn, I was able to read out the all FICR registers using MacOSX's nrfjprog command.

    Corrupted board

    0x10000000: FFFBFFFB DFFBFFFF FFFFFFFF FFFFFFFF   |................|
    0x10000010: F6F58FFB 0CFF9FF3 FFFFFFFF FFFFFFFF   |................|
    0x10000020: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF   |................|
    0x10000030: FFFFFF7E FF5DFE7E F3F737DF 7D4F3DFE   |~...~.]..7...=O}|
    0x10000040: FFFFFFFF FFFFFFFF FDDB7F3F FF7FFF7F   |........?.......|
    0x10000050: FFFFFFFF FFFFFFFF FF8BFB7F FFFFE2FF   |................|
    0x10000060: 9FDEFFDF EFF5EFFD FFFFFFFF FFFFFFFF   |................|
    0x10000070: 7DFFFBFD EF7EFB7D FFFFFFFE FFFFFFFF   |...}}.~.........|
    0x10000080: BFFFF9FF FFEFBBFF BF5F7BFE EDEFCFFE   |.........{_.....|
    0x10000090: EDBFFDBF FDFEFFFF B7FF7D93 FFEFFBFF   |.........}......|
    0x100000A0: FFFFFFFF F3FF77FF BDF8FFDE FFFFFFF6   |.....w..........|
    0x100000B0: 7DF3FDEF FF6B76EF 78EEFFFF E6FFEFFF   |...}.vk....x....|
    0x100000C0: EFEBEF7F FFFFFFFF FFFFFFFF FFFFFFFF   |................|
    0x100000D0: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF   |................|
    0x100000E0: FFFFFFFF FFFFFFFF FFFFFFFF FFBFDBEC   |................|
    0x100000F0: FFD7CA7F 7EFEDFBF D77FFDAF FBF7FB7F   |.......~........|
    

    Normal board

    0x10000000: 55AA55AA 55AA55AA FFFFFFFF FFFFFFFF   |.U.U.U.U........|
    0x10000010: 00000400 00000100 FFFFFFFF FFFFFFFF   |................|
    0x10000020: FFFFFFFF FFFF07FF FFFFFFFF FFFFFFFF   |................|
    0x10000030: FFFFFF00 00000002 00002000 00002000   |......... ... ..|
    0x10000040: FFFFFFFF FFFFFFFF 9893760F 980BF17E   |.........v..~...|
    0x10000050: FFFFFFF8 FFFFFFFF 00000000 FFFF0072   |............r...|
    0x10000060: 5385B16A A0FAF9B6 FFFFFFFF FFFFFFFF   |j..S............|
    0x10000070: 35524B48 2A0F3330 FFFFFF24 FFFFFFFF   |HKR503.*$.......|
    0x10000080: 18826933 4533D4A6 4A3D3AB8 D29D8E0A   |3i....3E.:=J....|
    0x10000090: C14DC4C5 59B53E1F 991975BD 7C8746CF   |..M..>.Y.u...F.||
    0x100000A0: FFFFFFFF 449AE15E A556437A FFFFFFF6   |....^..DzCV.....|
    0x100000B0: 78005000 5400004E 600C8005 00726424   |.P.xN..T...`$dr.|
    0x100000C0: 8203423E FFFFFFFF FFFFFFFF FFFFFFFF   |>B..............|
    0x100000D0: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF   |................|
    0x100000E0: FFFFFFFF FFFFFFFF FFFFFFFF 7D005200   |.............R.}|
    0x100000F0: 5C000050 680E8806 00726424 824B423E   |P..\...h$dr.>BK.|
    
  • Hi Ken, I kindly ask you to create a support ticket in Mypage so that we can follow up on this.

Related