Thingy91 debug probe and Blinky

Hello, I'm using Nordic Thingy91 for a college project, but I'm having some trouble figuring something out... I've managed to install every required extension on Visual Studio with Nrf Connect, but I can't exactly find good tutorials on how to program directly on the board, nor do I find easy ways to flash Nordic Thingy 91.

According to one of the tutorials (https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/working_with_nrf/nrf91/thingy91.html) one of the best ways to program is via a debug probe. I've never used one, though I have a decent enough idea of what they are. My biggest issue however, which I can't solve despite spending a few hours looking into it, is: does the Thingy91 have any external debug probe preference, or will any debug probe work? And if any debug probe works, is there some sort of setup I need to do with it before I can use it with the Thingy91?

This problem arises specially because I can't make the Blinky code work on the Thingy91, despite following several steps and recommendations from various sources on how to possibly fix.

I can flash the board properly via USB, using the app_signed.hex file, there are no errors accused in nrf connect, but when I turn on the board, nothing happens, it doesn't blink. This sort of problem seems to appear frequently in this support forum, so I figured some of these threads would have the answer I seek, but then I notice that the most popular ones are either 1+ years old or the solutions provided in them are very specific to the person asking the question.

I appreciate any help.

Parents
  • Hey,

    You can program the Thingy:91 via the Programmer-app in nRF Connect for Desktop. After building your program in VS Code, you can find the files you need in the build folder it generates. The Thingy:91 needs to be in application serial recovery mode, so hold the button (SW3) while turning it on and connect it via USB. When this is done, find the "app_signed.hex" file in the build directory and drag it to the Programmer-window. It should be smooth sailing from here. Following these steps should help you get the apps working.

    I recommend using the "LTE Link Monitor" to read outputs from the Thingy.

    I hope this is helpful, and that is answers your questions. Good luck!

    Kind regards,
    Torje

  • Hello, I've followed all of the steps that you have indicated; however, it still won't work. The only thing I haven't yet done is use the LTE Link Monitor to read outputs, but assuming that the LED doesn't blink red as it's supposed to, I'm not sure there's an output at all.

    Whenever I load it with the "asset_tracker_v2", it works properly and it even gives me the device's location (albeit with a pretty rough accuracy), even the LED flashes properly with green flickering lights, changing to purple and so on and so on.

    I just build the program on "thingy91_nrf9160_ns", using nrf Connect 2.3.0 SDK. My Nordic Thingy91 hardware version is 1.6.0.

    I'm not sure if this would affect anything, but I flashed the nrf52840 with the "thingy91_nrf52_connectivity_bridge_2023-03-02_8f26142b.hex" file, since I think that's how you update it.

    I've read online that one of the possible fixes would be to properly update nrf52840 properly and THEN the nrf9160 SiP in that specific order for it to start working? Maybe I did something wrong while updating? Please give me a hand.

Reply
  • Hello, I've followed all of the steps that you have indicated; however, it still won't work. The only thing I haven't yet done is use the LTE Link Monitor to read outputs, but assuming that the LED doesn't blink red as it's supposed to, I'm not sure there's an output at all.

    Whenever I load it with the "asset_tracker_v2", it works properly and it even gives me the device's location (albeit with a pretty rough accuracy), even the LED flashes properly with green flickering lights, changing to purple and so on and so on.

    I just build the program on "thingy91_nrf9160_ns", using nrf Connect 2.3.0 SDK. My Nordic Thingy91 hardware version is 1.6.0.

    I'm not sure if this would affect anything, but I flashed the nrf52840 with the "thingy91_nrf52_connectivity_bridge_2023-03-02_8f26142b.hex" file, since I think that's how you update it.

    I've read online that one of the possible fixes would be to properly update nrf52840 properly and THEN the nrf9160 SiP in that specific order for it to start working? Maybe I did something wrong while updating? Please give me a hand.

Children
  • So you can flash it with Asset Tracker, and it works fine. But when you flash it with Blinky, its just dead? And if you flash it with Asset Tracker again, it works fine? This is weird, but it tells us that "everything works", except the blinky app.

    Connectivity bridge for the nrf52 is correct. Building for thingy91_nrf9160_ns is correct. Your approach to flashing it is correct, as it works with Asset Tracker. So there must be something specific with the Blinky app.
    1. Are you sure its building properly? No errors in the logs? If there are any, can you share them?
    2. Have you done any changes at all to the blinky app? Did you try to do a pristine build? Or maybe deleting the app entirely and trying again from scratch?
    3. Have you tried other samples? Try building and flashing something else, just to see if it works.

    Perhaps Nordic employees will have some additional info here, but while you're waiting you can try these points.

  • When I do a pristine build, this is what shows up on the Visual Studio Terminal:

  • Aha, so its not building correctly. I'm not sure what that specific problem indicates. You might find more info in the actual build logs (You'll find them in the next tab - either output or terminal iirc).
    Now, it seems this error is not within the blinky app it self, but a part of the wider toolchain.It also seems this question might fall in the category "..solutions provided in them are very specific to the person asking the question", as you described it in your original post.

    I do not know what causes this error as I havent seen it before. The full build logs might be helpful in debugging further.  But I would just try to remove the blinky app completely and try again, or try with a different sample app. If it doesn't work, you might need some better help than I can give.

    Did you do any changes to the blinky app or other config files? If you did, please describe your steps here. And keep posting relevant info here, it will make it easier for the community or Nordic employees to give you the right help :)

  • Ok, so I somehow got it to work.

    What I did different was, when I was adding the build configuration, I didn't click on the "Enable debug options" checkbox, because I noticed that it had a disclaimer that said :

    "Enables these Kconfig options: CONFIG_DEBUG_OPTIMIZATIONS=y CONFIG_DEBUG_THREAD_INFO=y

     Debug optimizations can cause stack overflows if your threads' stack sizes are fine tuned for other optimization levels."

    And then I added the following line of code to prj.conf:

    CONFIG_BOOTLOADER_MCUBOOT=y,

    which is a workaround that worked for some people, at least according to the comment section in the following youtube video: https://www.youtube.com/watch?v=RiQM1_XlJ24

    Now the thingy91 is finally blinking red, but I'm going to check which of the two workarounds is the culprit for finally making it work, unless both actions were required.

  • Ok, so after testing several forms (whilst deleting and recreating the blinky app with different settings), I found out that the culprit for making blinky not work is the "Enable debug options" checkbox.

    The line of code I added to prj.conf was unneeded,

    So yeah, at last, I have made it work and now I know exactly what was messing with the blinky. Thank you for your help!

Related