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

NCS 2.0.0 samples will not work on nRF52840 Dongle

Hi,

I am trying to run any of the samples, even the most basic ones as blinky, and they will not run on my nRF52840 dongle, which has a header to program directly with jlink, using another DK to connect with debug out.

The dongle works perfectly using SDK 17.1.0, and same connection configuration.

They (samples) all work perfectly in any of the other nordic DK using NCS 2.0.0.

I have a mac pro with M1 running with all of the recommendations for vscode and jlink. (Intel versions)

Even trying to debug, enabling debug options at build time, will not give me access to the disassembly, or run for that matter.

At the beginning I thought that it could be the code needed to do the voltage setup for the leds to work, but then I saw that it was included on the board_nrf52840dongle_nrf52840_init() function inside the board.c for the dongle, as well as the code in the generated zhephyr.lst.

Can you tell me if I am doing something wrong?

Thanks!

Parents
  • Hello,

    If you try the older NCS versions (1.9.1), or the nRF5 SDK samples now, do they work? The reason I ask is because of what is said about the REGOUT0 register in this tutorial.

    I tested the blinky sample from 2.0.0 on a dongle. I programmed the default bootloader from the tutorial (link), and programmed the blinky application via nRF Connect for Desktop -> Programmer, and it works fine here.

    BR,
    Edvin

Reply
  • Hello,

    If you try the older NCS versions (1.9.1), or the nRF5 SDK samples now, do they work? The reason I ask is because of what is said about the REGOUT0 register in this tutorial.

    I tested the blinky sample from 2.0.0 on a dongle. I programmed the default bootloader from the tutorial (link), and programmed the blinky application via nRF Connect for Desktop -> Programmer, and it works fine here.

    BR,
    Edvin

Children
  • Thank you for your response .

    We are very familiar with using the dongle, as we have used it to prototype proofs of concept for clients extensively, not as a dongle but as a full board, sometimes powering it with external power instead of USB, and have always worked perfectly with SDK 17.1.0 and below. We always erase the flash completely and do not use the provided bootloader.

    As you mention in your tutorial, we have always modified REGOUT0 to adjust the voltage when using SDK 17. We do it even with our custom boards that we have in production with the nRF52833. We are upgrading our firmware from SDK17 to NCS.

    Currently, with NCS, the program will not even start, it is not a problem with adjusting the voltage so the LEDs work.

    We are not using the USB bootloader. We program directly in the P1 SWD interface.

    I tried in NCS 1.9.1 and it does not work either.

    I also saw on NCS that the code needed to adjust REGOUT0 is included on the board_nrf52840dongle_nrf52840_init() function inside the board.c for the dongle, as well as the code in the generated zhephyr.lst.

    Please advice.

    Thanks!

  • But I guess it worked if you would program the default bootloader back in?

    By default, when you are building for the board nrf52840dongle_nrf52840, NCS will add an offset of the image to start after the MBR from the nRF5 SDK bootloader. You can see it in NCS\zephyr\boards\arm\nrf52840dongle_nrf52840\kconfig.defconfig, line 23.

    What you also can see there is that this is dependent on the config BOARD_HAS_NRF5_BOOTLOADER which is set to 'y' by default, when you are using the nrf52840dongle_nrf52840 board. 

    So try to add this line to your prj.conf:

    CONFIG_BOARD_HAS_NRF5_BOOTLOADER=n. Then you should see that the generated application image will no longer have the 0x1000 offset, and you should be able to program it with an external programmer, and it should run as you'd expect. 

    Without that configuration, this is the resulting .hex file:

    When there is no MBR present to start the application at 0x1000, then nothing will happen.

    Best regards,

    Edvin

  • It worked beautifully. Thanks!!! Relaxed

Related