I'm having an issue programming the bootloader using .hex file. I have "Erase all" by nrf52832 and was trying to debug my bootloader the code didn't stop at the beginning of the main. By breaking the code I was it was running in the Softdevice. Finally I figure out that the UICR[0] register wasn't written to the address of the bootloader. I manually write the address with nrfjprog.exe using the following command line and it start running properly:
nrfjprog.exe --family NRF52 --memwr 0x10001014 --val 0x00078000
Then I try to update the softdevice and applicative firmware and everything work fine.
I then try to update the bootloader version but it doesn't work. I'm trying to figure out what is not working properly but having some problem to run the bootloader in debug. Anyway I figure out that if I write the UICR[1] register to the __mbr_params_page_start__ (0x0007E000).
I was trying to see in the code where the UICR[1] register is use that could cause my problem. There is the following definition that I found but it doesn't seems to be used:
#define MBR_PARAMS_PAGE_ADDRESS (NRF_UICR->NRFFW[1])
Any idea why I can't update my bootloader if NRF_UICR->NRFFW[1] != 0x0007E000?
Also is there a way to have the NRF_UICR->NRFFW[0] and NRF_UICR->NRFFW[1] values included in the .hex file without modifying it manually?
Thank!