Hi
I have my nrf9160 custom board assembled and ready to program. I am trying to program the nrf9160 module using j-link. In the j-link commander window selecting core M33, and using SWD interface, it does detect the Cortex M33 but then it gives me error as in the attached image
I use the j-link external programmer for other ARM devices and it works fine. Does it need any firmware update to support ARMv8-M?
please help ..
thanks
Using J-link to program nrf9160
how do I upload an image? or attach image with the post??
- Edited
I am copying below the output in the j-link commander window:
`Please specify target interface:
J) JTAG (Default)
S) SWD
T) cJTAG
TIF>s
Specify target interface speed [kHz]. <Default>: 4000 kHz
Speed>
Device “CORTEX-M33” selected.
Connecting to target via SWD
Found SW-DP with ID 0×6BA02477
Scanning AP map to find all available APs
AP[7]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0×84770001)
AP[1]: AHB-AP (IDR: 0×24770011)
AP[2]: JTAG-AP (IDR: 0×12880000)
AP[3]: APB-AP (IDR: 0×54770002)
AP[4]: JTAG-AP (IDR: 0×12880000)
AP[5]: JTAG-AP (IDR: 0×12880000)
AP[6]: CUSTOM-AP (IDR: 0×128800A1)
Iterating through AP map to find AHB-AP to use
AP[0]: Core found
AP[0]: AHB-AP ROM base: 0xE00FF000
CPUID register: 0×410FD212. Implementer code: 0×41 (ARM)
Found Cortex-M33 r0p2, Little endian.
****** Error: Specific core setup failed.
Cannot connect to target.
`
It gives error:
The connected j-link [s/n xxx] does not support the ARMv8-M architecture debugging is not possible
The best thing to do is installed the Nordic Command Line tools and use nrfjprog
or use the west flash
command. I describe west flash
here.
Running nrfjprog gives me DLL error:
nrfjprog -f nrf91 --reset
ERROR: JLinkARM DLL reported an error. Try again. If error condition
Also tried through nrfConnect - Programmer - that also gives error:
2020-12-20T18:17:39.570Z INFO Using nrfjprog library 10.12.1, pc-nrfjprog-js 1.7.6
2020-12-20T18:17:42.382Z INFO Using nrfjprog to communicate with target
2020-12-20T18:17:42.713Z 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)
Finally, I found that my j-link programmer is version V8 and I would need V9 / V10, those support M33
I have ordered V9, will try to program my custom board once I have that.
Thank you so much!
SilasValera Since this is a custom board, I won’t be able to help you much more. I will say that the JLINKARM_DLL_ERROR
is common when the nRF9160 is:
- Not powered correctly
- Or there’s a bad connection
I would inspect the pins in a microscope to make sure your power, ground and SWD pins are connected properly to your board.
Also, a nRF53DK or nRF9160-DK works well as a programmer. I know that both of those work for sure in doing my testing here. The J-link Mini Edu also works with the caveat that your project is for education only.
Hi Jared
I could program nrf9160
Here is what I did: I had some old STM32 Nucleo boards, these boards come with ST-Link programmer. I flashed the firmware of this programmer to J-Link (using this on Segger) so that it could be used as j-link programmer. And then testing my custom board using j-link commander to connect. It connected fine without any issue/error.
And then using the NRF Connect Programmer I uploaded the modem FW. That worked perfectly fine.
Now next step is to upload the lte modem application code to nRF module. How can I do that? One way is to use the serial port pins - like nRF Feather board. I do have a serial port pins available on my custom board. But is there a way to use nRF Connect Programmer to upload the code?
Thank you so much for your help
- Edited
SilasValera Now next step is to upload the lte modem application code to nRF module. How can I do that? One way is to use the serial port pins - like nRF Feather board. I do have a serial port pins available on my custom board. But is there a way to use nRF Connect Programmer to upload the code?
Use the nRF Connect Desktop Programmer:
More details here: https://docs.jaredwolff.com/nrf9160-nrf-connect-desktop.html?highlight=modem,firmware#updating-modem-firmware
Hi Jared,
I could load the application code to the nRF9160 module. And I could test my custom board, it works as expected :}
Only one issue, it does not work for sending data over UDP connections. I think the SLM version seems different. But that is a different issue, will look for the right version on GitHub.
Thank you so much for your help!