Hi guys,
I'm leading a project with the nrf52840 dongle connected to a Raspberry Pi via the GPIO header.
The firmware updating options for the Nordic are a bit limited in the sense that the dongle needs DFU via USB port and I don't want to make this extra connection. So instead I'm exploring openocd for programming via the SWDIO & SWDCLK pins. I was able to get it to work with some ease but now I'm struggling to understand the flash memory regions.
In my project, I'm using Bluetooth and my linker file looks something like this:
MEMORY { FLASH (rx) : ORIGIN = 0x27000, LENGTH = 0xd9000 RAM (rwx) : ORIGIN = 0x20002300, LENGTH = 0x3dd00 }
Using the Nordic programming tool and dragging the hex file I can see the address starting in the position 0x27000 as expected and with the length of the program. Doing some calculations 0x27000+0xd9000 = 0x100000, so I was expecting the memory regions from 0x27000 to 0x100000 to be all program-related. However, when I type the command to erase everything from 0x27000 to 0x100000 the bootloader stops working, making me believe that I'm also messing with some bootloader regions... Is that true? Or it is openocd not working as expected?
Also, do you know in what region of the memory are the User Information Configuration Registers (UICR)? I want to avoid deleting it or erasing it by mistake since it would make the regulator use 1.8V instead of 3V.
Best regards,
Fernando Fontes