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

Parents
  • Brett said:

    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).

    Thanks a lot for the feedback! I honestly struggle a little bit with remembering all the details here, so I would appreciate if we could start all over again :-)

    Is the Thingy:91 setup you have according to the picture below?

    And are you in general able to successfully flash the nRF52840 with the Connectivity bridge and respectively the nRF9160 with one of the other applications included in this firmware package?

    Regards,

    Markus

  • Hi Markus,

    More than happy to start again, there is a whole lot of stuff above.

    Connection:
    * I am connected the same as the picture above and I also have a j-link edu mini that I am using, both give the same outcome.

    Project Objective:
    Receive Bike power data via ANT+ on the 52840 (soft device 340) transfer this data over UART to the 9160, so it can then send the data (with GPS) to an MQTT receiver.  All of the code works on the 9160DK, so it was now time to transfer it to the thingy 91, which is where I am stuck.

    Details:
    I can flash the 52840 with out a problem and the code I have appears to work.  I connected via Jlink and can see the NRF_LOG messages coming to the terminal window, that all looks good.  Appears to work means, I can receive ANT+ messages from my bike power meter and able to LOG them to the terminal - UART connection to the 9160 is not yet successful.

    I can flash the 9160 image, as long as I dont have any code on the 52840.  So, if I erase-all on the 52840, I can flash the image fine.  But, if I have my image on the 52840 first, I am unable to falsh the 9160. Today, I managed to get some debug messages on the RTT-Terminal window, but have not done enough testing to confirm if its actually getting the GPS co-ordinates correctly, or connecting to the network correctly - I will test that tomorrow.

    Issue:
    The real issue that I am faced with at the moment is, if I have my image flashed to the 52840, I cant flash the 9160.  If I flash the 9160 first, I can flash the 52840 - but have not then been able to connect back onto the 9160 - until I remove the image from the 52840. If I remove the 51840 image, I can then connect back onto the 9160 and see the image that I originally flashed.

    In reading the docs, I didnt see anything about an order in which you had to flash the images, so I am sure I am doing something wrong :).

    I can record a screen capture of what I am doing if that helps, or I have pushed my latest code to github if  you are interested.  If you would like a flow diagram of the project, I can easily draw one.

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

    regards
    -brett

Reply
  • Hi Markus,

    More than happy to start again, there is a whole lot of stuff above.

    Connection:
    * I am connected the same as the picture above and I also have a j-link edu mini that I am using, both give the same outcome.

    Project Objective:
    Receive Bike power data via ANT+ on the 52840 (soft device 340) transfer this data over UART to the 9160, so it can then send the data (with GPS) to an MQTT receiver.  All of the code works on the 9160DK, so it was now time to transfer it to the thingy 91, which is where I am stuck.

    Details:
    I can flash the 52840 with out a problem and the code I have appears to work.  I connected via Jlink and can see the NRF_LOG messages coming to the terminal window, that all looks good.  Appears to work means, I can receive ANT+ messages from my bike power meter and able to LOG them to the terminal - UART connection to the 9160 is not yet successful.

    I can flash the 9160 image, as long as I dont have any code on the 52840.  So, if I erase-all on the 52840, I can flash the image fine.  But, if I have my image on the 52840 first, I am unable to falsh the 9160. Today, I managed to get some debug messages on the RTT-Terminal window, but have not done enough testing to confirm if its actually getting the GPS co-ordinates correctly, or connecting to the network correctly - I will test that tomorrow.

    Issue:
    The real issue that I am faced with at the moment is, if I have my image flashed to the 52840, I cant flash the 9160.  If I flash the 9160 first, I can flash the 52840 - but have not then been able to connect back onto the 9160 - until I remove the image from the 52840. If I remove the 51840 image, I can then connect back onto the 9160 and see the image that I originally flashed.

    In reading the docs, I didnt see anything about an order in which you had to flash the images, so I am sure I am doing something wrong :).

    I can record a screen capture of what I am doing if that helps, or I have pushed my latest code to github if  you are interested.  If you would like a flow diagram of the project, I can easily draw one.

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

    regards
    -brett

Children
No Data
Related