Thingy91: Process to flash s340 and 52840

Hi,

I have been doing my development on the 9160DK and now its time to move the code over to the thingy 91.  I managed to get the 9160 flashed by following (https://devzone.nordicsemi.com/guides/cellular-iot-guides/b/getting-started-cellular/posts/how-to-program-any-project-to-the-thingy-91-with-dfu), but the 52840 and s340 softdevice seem to be a different story.

I  tried to follow, without success:
https://infocenter.nordicsemi.com/index.jsp?topic=%2Fug_thingy91_gsg%2FUG%2Fthingy91_gsg%2Fupdating_fw.html

What I am not sure or have tried:
* Do I need to have the SWD-Select on nRF52, before I power-up (whilst holding sw4) ?  I saw one document indicating you needed to, but the above doesnt indicate you need to.  (I tried both)

* The image starts to load, but then I get the `Image Upload Failed: Bad response from device`.  I got the same error with the 9160, but by following the DFU link above, got around the problem - I am not sure how to get around it with the 52840, since I am not using zephyr.

* My 52840 software is using ANT+ therefore, I require the s340 softdevice and am using the legacy nRF5 SDK - since its not supported in zephyr.  The original way to load the s340 was with `nrfjprog` but that doesnt seem to work.

* For the 52840, do I need to use an external connection - say the 9160dk to be able to flash it ?

regards
-brett

  • Hey Kenneth,


    More details, this is leading up to current state of not working:

    The thingy was working fine before I started all this, as I tested with the default tracking app

    I uploaded my own code onto the 9160 via the USB with MCU Boot, and it seemed to work fine however I was unable to load my 52840 code, hence the reason for going through jlink on the 9160dk, of which that is all working but.

    So before I bricked the thingy 91 (9160) it was all working.

    When I did the mcu-boot, it originally didnt work due to the memory layout or something, so I followed one of the online guides to get the resolved:

    essentially:

    CMakeLists.txt

    list(APPEND mcuboot_OVERLAY_CONFIG
    "${CMAKE_CURRENT_SOURCE_DIR}/mcuboot_overlay-thingy91.conf"
    )

    mcuboot_overlay-thingy91.conf

    CONFIG_BOOT_SIGNATURE_TYPE_RSA=y
    CONFIG_BOOT_SIGNATURE_KEY_FILE="root-rsa-2048.pem"

    Not sure it that had something to do with it ?


    I managed to get access to another thingy 91 to ensure it was not my cables or machine and can see the 9160 and 52840 - so I know all my connections etc... are good, and it appears to be the 9160 ?

    Therefore, back to the current issue, if I have bricked it, how do I un-brick it - or if its dead hardware, how do I confirm this ?

    cheers
    -brett

  • Hi Kenneth,

    I got it to work, but want to confirm my logic.

    If I write my code to the 52840 I am then not able to access the 9160, eg:

    5280 = empty
    9160 = able see and access

    52840 = load my code
    9160 = not able to access

    52840 = erase my code
    9160 = able to see and access

    9160 = load my code
    52840 = load my code

    As long at the 52840, doenst have any code on it - I was able to access it.

    regards

    -brett

  • Hi Kenneth,

    I was a bit optimistic when I said I got it to work Slight smile

    No matter what I do, as soon as I flash anything to the 52840, I am unable to re-access the 9160.  If I erase the 52840 I can see the 9160 and the image that was flashed to it.

    In all cases, my code on 5280 = no access to 9160.

    Can you confirm my original logic: all code was built and works fine on the 9160DK but I cant get it to work on the thingy.
    * 9160 = using zephr
    * 52840 = software is using ANT+ therefore, I require the s340 softdevice and am using the legacy nRF5 SDK - since its not supported in zephyr.

    I have put my code on github if there is anything that will help define what I am doing wrong, I will continue to test.

    9160 : github.com/.../gps_iot_thingy
    52840: github.com/.../ant_app_libUARTE

    regards
    -brett

  • Hello Brett,

    my apologies for the delayed answer! I will take over this case from Kenneth.

    Brett said:
    No matter what I do, as soon as I flash anything to the 52840, I am unable to re-access the 9160.  If I erase the 52840 I can see the 9160 and the image that was flashed to it.

    Is the status still the same or have you been able to make some progress?

    I need to read through the whole case and dive a little into the issue. I will come back to you as soon as possible.

    Regards,

    Markus

  • Hi Markus,

    Status is basically the same, whenever I load my code on the 52840, the 9160 is inaccessible.

    I can confirm the 52840 code is flashed correctly, as I can get some printf() logs on the debug terminal (NRF_LOG not working yet).

    regards
    -brett

Related