The nRF52840 proMicro is flashed, but the firmware code does not run.

Hello everyone. I'm using the nRF52840 Pro Micro board with the J-Link programmer and the nRF Connect extension for VS Code. This board comes with a U2F bootloader, but I completely erased it and am trying to flash the nRF52840 using J-Link (SWD). I can't get the basic Blinky example to run. One day during my research, this example ran after setting the BOOTLOADER_MCUBOOT configuration, and everything worked fine, even outputting logs via RTT. But the next day, everything stopped working. I don't know what's causing this, but when I try to flash the chip itself, I get no results—no logs, no flashing LED. When viewing the firmware memory addresses in Programmer, I saw the following:
The file memory layout is divided into three sections:
0x00001000 - 0x0000A829
0x0000A82C - 0x0000A96E
0x0000A970 - 0x0000A997
total size 39317 bytes.

The chip firmware is represented by a single section.
0x00001000 - 0x0000A997
total size 39320 bytes.

I tried working with an nRF52840 dongle; everything boots and I even managed to enable BLE. After that, I concluded that my problems with the Pro Micro board were likely due to the fact that I don't have a bootloader (is this conclusion correct?). This is probably why the byte count in merged.hex doesn't match the chip firmware read(memory gap, as I read).

I'm not sure about the beginning of my story, but I tried running the firmware in different ways and flashing it using different methods (I don't know if this makes a difference).

I would be very grateful for help solving this problem, and I would be even more grateful if you could explain to me how to use universal programs to avoid this problem every time.

Sincerely,

Parents
  • I found a solution to my problem, and I'll describe it here; perhaps it'll be useful to someone.

    It was enough to completely clean the SoC.

    nrfjprog -f nrf52840 --eraseall

    Then flash the SoftDevice S140.
    nrfjprog --program /Path/to/your/s140_nrf52_7.3.0_softdevice.hex -f nrf52 --chiperase

    This is a binary BLE stack that resides in the lower portion of the flash memory and hijacks some hardware resources. In the programmer, this portion of the flash memory is marked in orange and labeled "MBR". This is likely what the microcontroller is missing.
    Then, after flashing the softdevice s140, flash your board via SWD.

Reply
  • I found a solution to my problem, and I'll describe it here; perhaps it'll be useful to someone.

    It was enough to completely clean the SoC.

    nrfjprog -f nrf52840 --eraseall

    Then flash the SoftDevice S140.
    nrfjprog --program /Path/to/your/s140_nrf52_7.3.0_softdevice.hex -f nrf52 --chiperase

    This is a binary BLE stack that resides in the lower portion of the flash memory and hijacks some hardware resources. In the programmer, this portion of the flash memory is marked in orange and labeled "MBR". This is likely what the microcontroller is missing.
    Then, after flashing the softdevice s140, flash your board via SWD.

Children
No Data
Related