This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Programming Nordic Thingy:91

Hello,

I have some trouble programming nRF Thingy:91 and therefore would like to ask some questions about possibilities to flash the devices:

1) It is not possible to program nRF9160 on Thingy:91 from nRF52840-DK, because it's from older generation (ARMv7, https://devzone.nordicsemi.com/f/nordic-q-a/51799/programming-thingy-91)

but is it possible to program nRF52840 on Thingy:91 from nRF52840-DK?

2) Considering aforementioned reasons, it should be possible to program nRF9160 on Thingy:91 from nRF5340-PDK. Is that true?

Unfortunately anything I try to do ends with nRF Connect (nrjfprog shows similar) showing such error message:

Could not fetch memory size of target devkit: Error: Error occured when get library info. Errorcode: CouldNotOpenDevice (0x4) Lowlevel error: JLINKARM_DLL_ERROR (ffffff9a)

I can program nRF9160 via USB using MCUboot, but that's not the same.

Any clue what I might be doing wrong?

Parents
  • Hi jrew,

    That's correct, the programmer chip on nRF52840 DK cannot flash the nRF9160 since it has an M33 architecture. (You should be able to program the nrf52840 on the THingy:91 using the nrf52840DK, jsut make sure you have the switch on the Thingy to nrf52) 

    However, the nRF5340-PDK has an updated programmer chip that supports that architecture so there should be no issues using that on the Thingy:91. 

    I just verified that it worked: (please share the log output if you have any issues)

    2020-08-12T12:22:41.662Z INFO Application data folder: C:\Users\male\AppData\Roaming\nrfconnect\pc-nrfconnect-programmer
    2020-08-12T12:22:41.738Z DEBUG App pc-nrfconnect-programmer v1.4.4 official
    2020-08-12T12:22:41.738Z DEBUG App path: C:\Users\male\.nrfconnect-apps\node_modules\pc-nrfconnect-programmer
    2020-08-12T12:22:41.738Z DEBUG nRFConnect 3.4.2 is supported by the app (^3.3.0)
    2020-08-12T12:22:41.738Z DEBUG nRFConnect path: C:\Users\male\AppData\Local\Programs\nrfconnect\resources\app.asar
    2020-08-12T12:22:41.738Z DEBUG HomeDir: C:\Users\male
    2020-08-12T12:22:41.738Z DEBUG TmpDir: C:\Users\male\AppData\Local\Temp
    2020-08-12T12:22:41.750Z INFO Using nrfjprog library 10.9.0, pc-nrfjprog-js 1.7.3
    2020-08-12T12:22:41.754Z VERBOSE Could not fetch serial number for serial port at COM1
    2020-08-12T12:22:41.754Z VERBOSE Could not fetch serial number for serial port at COM3
    2020-08-12T12:22:54.371Z INFO Using nrfjprog to communicate with target
    2020-08-12T12:22:54.938Z INFO Using J-Link Software version 6.80
    2020-08-12T12:22:55.754Z INFO Segger serial:  960187689
    2020-08-12T12:22:55.754Z INFO Segger speed:  2000  kHz
    2020-08-12T12:22:55.754Z INFO Segger version:  J-Link OB-K22-NordicSemi compiled Jan 21 2020 17:33:01
    2020-08-12T12:22:55.760Z INFO Core probed: 960187689.
    2020-08-12T12:22:55.760Z INFO Core RAM: 256KiB.
    2020-08-12T12:22:55.760Z INFO Core ROM: 1024KiB in pages of 4KiB.
    2020-08-12T12:22:56.052Z INFO Model: NRF9160_xxAA_REV1.
    2020-08-12T12:22:56.594Z INFO Core0: Reading device non-volatile memory. This may take a few seconds.
    2020-08-12T12:22:56.789Z INFO Core0: UICR has been read. Click read button to read full non-volatile memory.
    2020-08-12T12:23:34.286Z INFO Parsing HEX file:  C:\Users\male\Desktop\nRF91\PRECOMPILED\thingy91_fw_2020-04-29_bc7ade8b\images_full\thingy91_ltem_2020-04-29_bc7ade8b.hex
    2020-08-12T12:23:34.303Z INFO File was last modified at  7/29/2020, 4:13:07 PM
    2020-08-12T12:23:38.671Z INFO Recovery procedure finished
    2020-08-12T12:23:38.675Z INFO Using nrfjprog to communicate with target
    2020-08-12T12:23:39.343Z INFO Using J-Link Software version 6.80
    2020-08-12T12:23:40.150Z INFO Segger serial:  960187689
    2020-08-12T12:23:40.150Z INFO Segger speed:  2000  kHz
    2020-08-12T12:23:40.150Z INFO Segger version:  J-Link OB-K22-NordicSemi compiled Jan 21 2020 17:33:01
    2020-08-12T12:23:40.157Z INFO Core probed: 960187689.
    2020-08-12T12:23:40.157Z INFO Core RAM: 256KiB.
    2020-08-12T12:23:40.157Z INFO Core ROM: 1024KiB in pages of 4KiB.
    2020-08-12T12:23:40.449Z INFO Model: NRF9160_xxAA_REV1.
    2020-08-12T12:23:40.980Z INFO Core0: Reading device non-volatile memory. This may take a few seconds.
    2020-08-12T12:23:41.175Z INFO Core0: UICR has been read. Click read button to read full non-volatile memory.
    2020-08-12T12:23:41.321Z INFO Writing procedure starts for core0
    2020-08-12T12:24:06.253Z INFO Write procedure finished
    2020-08-12T12:24:06.254Z INFO Using nrfjprog to communicate with target
    2020-08-12T12:24:06.815Z INFO Using J-Link Software version 6.80
    2020-08-12T12:24:07.669Z INFO Segger serial:  960187689
    2020-08-12T12:24:07.669Z INFO Segger speed:  2000  kHz
    2020-08-12T12:24:07.669Z INFO Segger version:  J-Link OB-K22-NordicSemi compiled Jan 21 2020 17:33:01
    2020-08-12T12:24:07.675Z INFO Core probed: 960187689.
    2020-08-12T12:24:07.676Z INFO Core RAM: 256KiB.
    2020-08-12T12:24:07.676Z INFO Core ROM: 1024KiB in pages of 4KiB.
    2020-08-12T12:24:07.968Z INFO Model: NRF9160_xxAA_REV1.
    2020-08-12T12:24:08.527Z INFO Core0: Reading device non-volatile memory. This may take a few seconds.
    2020-08-12T12:24:08.721Z INFO Core0: UICR has been read. Click read button to read full non-volatile memory.
    2020-08-12T12:24:21.035Z INFO Target device closed.
    

    Please make sure you have the latest Jlink drivers etc. (check via cmd: 'nrfjprog -v')

Reply
  • Hi jrew,

    That's correct, the programmer chip on nRF52840 DK cannot flash the nRF9160 since it has an M33 architecture. (You should be able to program the nrf52840 on the THingy:91 using the nrf52840DK, jsut make sure you have the switch on the Thingy to nrf52) 

    However, the nRF5340-PDK has an updated programmer chip that supports that architecture so there should be no issues using that on the Thingy:91. 

    I just verified that it worked: (please share the log output if you have any issues)

    2020-08-12T12:22:41.662Z INFO Application data folder: C:\Users\male\AppData\Roaming\nrfconnect\pc-nrfconnect-programmer
    2020-08-12T12:22:41.738Z DEBUG App pc-nrfconnect-programmer v1.4.4 official
    2020-08-12T12:22:41.738Z DEBUG App path: C:\Users\male\.nrfconnect-apps\node_modules\pc-nrfconnect-programmer
    2020-08-12T12:22:41.738Z DEBUG nRFConnect 3.4.2 is supported by the app (^3.3.0)
    2020-08-12T12:22:41.738Z DEBUG nRFConnect path: C:\Users\male\AppData\Local\Programs\nrfconnect\resources\app.asar
    2020-08-12T12:22:41.738Z DEBUG HomeDir: C:\Users\male
    2020-08-12T12:22:41.738Z DEBUG TmpDir: C:\Users\male\AppData\Local\Temp
    2020-08-12T12:22:41.750Z INFO Using nrfjprog library 10.9.0, pc-nrfjprog-js 1.7.3
    2020-08-12T12:22:41.754Z VERBOSE Could not fetch serial number for serial port at COM1
    2020-08-12T12:22:41.754Z VERBOSE Could not fetch serial number for serial port at COM3
    2020-08-12T12:22:54.371Z INFO Using nrfjprog to communicate with target
    2020-08-12T12:22:54.938Z INFO Using J-Link Software version 6.80
    2020-08-12T12:22:55.754Z INFO Segger serial:  960187689
    2020-08-12T12:22:55.754Z INFO Segger speed:  2000  kHz
    2020-08-12T12:22:55.754Z INFO Segger version:  J-Link OB-K22-NordicSemi compiled Jan 21 2020 17:33:01
    2020-08-12T12:22:55.760Z INFO Core probed: 960187689.
    2020-08-12T12:22:55.760Z INFO Core RAM: 256KiB.
    2020-08-12T12:22:55.760Z INFO Core ROM: 1024KiB in pages of 4KiB.
    2020-08-12T12:22:56.052Z INFO Model: NRF9160_xxAA_REV1.
    2020-08-12T12:22:56.594Z INFO Core0: Reading device non-volatile memory. This may take a few seconds.
    2020-08-12T12:22:56.789Z INFO Core0: UICR has been read. Click read button to read full non-volatile memory.
    2020-08-12T12:23:34.286Z INFO Parsing HEX file:  C:\Users\male\Desktop\nRF91\PRECOMPILED\thingy91_fw_2020-04-29_bc7ade8b\images_full\thingy91_ltem_2020-04-29_bc7ade8b.hex
    2020-08-12T12:23:34.303Z INFO File was last modified at  7/29/2020, 4:13:07 PM
    2020-08-12T12:23:38.671Z INFO Recovery procedure finished
    2020-08-12T12:23:38.675Z INFO Using nrfjprog to communicate with target
    2020-08-12T12:23:39.343Z INFO Using J-Link Software version 6.80
    2020-08-12T12:23:40.150Z INFO Segger serial:  960187689
    2020-08-12T12:23:40.150Z INFO Segger speed:  2000  kHz
    2020-08-12T12:23:40.150Z INFO Segger version:  J-Link OB-K22-NordicSemi compiled Jan 21 2020 17:33:01
    2020-08-12T12:23:40.157Z INFO Core probed: 960187689.
    2020-08-12T12:23:40.157Z INFO Core RAM: 256KiB.
    2020-08-12T12:23:40.157Z INFO Core ROM: 1024KiB in pages of 4KiB.
    2020-08-12T12:23:40.449Z INFO Model: NRF9160_xxAA_REV1.
    2020-08-12T12:23:40.980Z INFO Core0: Reading device non-volatile memory. This may take a few seconds.
    2020-08-12T12:23:41.175Z INFO Core0: UICR has been read. Click read button to read full non-volatile memory.
    2020-08-12T12:23:41.321Z INFO Writing procedure starts for core0
    2020-08-12T12:24:06.253Z INFO Write procedure finished
    2020-08-12T12:24:06.254Z INFO Using nrfjprog to communicate with target
    2020-08-12T12:24:06.815Z INFO Using J-Link Software version 6.80
    2020-08-12T12:24:07.669Z INFO Segger serial:  960187689
    2020-08-12T12:24:07.669Z INFO Segger speed:  2000  kHz
    2020-08-12T12:24:07.669Z INFO Segger version:  J-Link OB-K22-NordicSemi compiled Jan 21 2020 17:33:01
    2020-08-12T12:24:07.675Z INFO Core probed: 960187689.
    2020-08-12T12:24:07.676Z INFO Core RAM: 256KiB.
    2020-08-12T12:24:07.676Z INFO Core ROM: 1024KiB in pages of 4KiB.
    2020-08-12T12:24:07.968Z INFO Model: NRF9160_xxAA_REV1.
    2020-08-12T12:24:08.527Z INFO Core0: Reading device non-volatile memory. This may take a few seconds.
    2020-08-12T12:24:08.721Z INFO Core0: UICR has been read. Click read button to read full non-volatile memory.
    2020-08-12T12:24:21.035Z INFO Target device closed.
    

    Please make sure you have the latest Jlink drivers etc. (check via cmd: 'nrfjprog -v')

Children
  • Dear Martin,

    nRF Connect log:

    2020-08-12T12:57:10.074Z INFO Application data folder: /home/jr/.config/nrfconnect/pc-nrfconnect-programmer
    2020-08-12T12:57:10.186Z DEBUG App pc-nrfconnect-programmer v1.4.4 official
    2020-08-12T12:57:10.186Z DEBUG App path: /home/jr/.nrfconnect-apps/node_modules/pc-nrfconnect-programmer
    2020-08-12T12:57:10.186Z DEBUG nRFConnect 3.4.2 is supported by the app (^3.3.0)
    2020-08-12T12:57:10.186Z DEBUG nRFConnect path: /tmp/.mount_nrfconBiHKDX/resources/app.asar
    2020-08-12T12:57:10.186Z DEBUG HomeDir: /home/jr
    2020-08-12T12:57:10.186Z DEBUG TmpDir: /tmp
    2020-08-12T12:57:10.224Z INFO Using nrfjprog library 10.9.0, pc-nrfjprog-js 1.7.3
    2020-08-12T12:57:10.520Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS0
    2020-08-12T12:57:10.521Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS1
    2020-08-12T12:57:10.521Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS10
    2020-08-12T12:57:10.521Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS11
    2020-08-12T12:57:10.521Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS12
    2020-08-12T12:57:10.521Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS13
    2020-08-12T12:57:10.521Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS14
    2020-08-12T12:57:10.521Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS15
    2020-08-12T12:57:10.521Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS16
    2020-08-12T12:57:10.521Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS17
    2020-08-12T12:57:10.521Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS18
    2020-08-12T12:57:10.521Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS19
    2020-08-12T12:57:10.521Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS2
    2020-08-12T12:57:10.521Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS20
    2020-08-12T12:57:10.521Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS21
    2020-08-12T12:57:10.521Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS22
    2020-08-12T12:57:10.521Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS23
    2020-08-12T12:57:10.521Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS24
    2020-08-12T12:57:10.522Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS25
    2020-08-12T12:57:10.522Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS26
    2020-08-12T12:57:10.522Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS27
    2020-08-12T12:57:10.522Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS28
    2020-08-12T12:57:10.522Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS29
    2020-08-12T12:57:10.522Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS3
    2020-08-12T12:57:10.522Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS30
    2020-08-12T12:57:10.522Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS31
    2020-08-12T12:57:10.522Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS4
    2020-08-12T12:57:10.522Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS5
    2020-08-12T12:57:10.522Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS6
    2020-08-12T12:57:10.522Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS7
    2020-08-12T12:57:10.522Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS8
    2020-08-12T12:57:10.522Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS9
    2020-08-12T12:57:20.308Z INFO Using nrfjprog to communicate with target
    2020-08-12T12:57:22.002Z ERROR Could not fetch memory size of target devkit: Error: Error occured when get library info. Errorcode: CouldNotOpenDevice (0x4)
    Lowlevel error: JLINKARM_DLL_ERROR (ffffff9a)
    

    JLink Drivers version:

    $ nrfjprog -v
    nrfjprog version: 10.3.0
    JLinkARM.dll version: 6.82c
    

    Question:

    Should SW10 on nRF5340-PDK be in any special position? (It is switched to OFF, because if ON the debugger doesn't show up in nRF Connect)

  • Dear Martin,

    I have discovered the reason for my issues. Unfortunately both IDC 10-pin cables I have bought are faulty. I've managed to find another one that works and I can verify that:

    • It is possible to program nRF52840 on Thingy:91 from nRF52840-DK and nRF5340-PDK.
    • It is possible to program nRF9160 on Thingy:91 from nRF5340-PDK.

    Thanks for your help,

    Best regards!

Related