sandeepmistry / arduino-nRF5

Arduino Core for Nordic Semiconductor nRF5 based boards
Other
873 stars 278 forks source link

Trouble loading Blink program on Nordic nRF52832 via J-Link mini EDU #428

Closed JLOCK1776 closed 3 years ago

JLOCK1776 commented 3 years ago

Hello, first time post. I have been trying to get the basic Blink example working on a custom PCB with Nordic nRF52832 chip. I can flash via J-link using nrfjprog with the Sandeep Mistry nRF52 bootloader as I want to ultimately upload a larger Adafruit nRF52832 feather program. It appears as though the bootloader and program are loading correctly onto the board (via SWD selected on J-Link Commander. The J-Link shows up fine on the J-Link Commander as "J-Link EDU Mini V1 compiled Oct V1.00". I loaded the USB driver for the J-Link, which also appears to work as I can do nrfjprog. I did notice the adapter speed for IDE is 10000 kHz while the J-Link Configurator shows 4000 kHz. Alternately, I tried to use the Arduino IDA to load the bootloader (board=generic nRF52, SoftDevice=S132, Programmer=JLink). With the Arduino IDE, I get the following error. So I'm stuck getting it to load from IDE, but able to get it to load via nrfjprog, but not run. In addition to below IDE error, I have attached the nrfjprog log.log file as well a subset of the schematic with the nRF52832 connections for SWD J-link connection.

Any help would be greatly appreciated. log.log 2020-10-05 18 45 42

IDE ERROR BELOW C:\Users\jlauc\Documents\ArduinoData\packages\sandeepmistry\tools\openocd\0.10.0-dev.nrf5/bin/openocd.exe -d2 -f interface/jlink.cfg -c transport select swd; set WORKAREASIZE 0; -f target/nrf52.cfg -c init; halt; nrf51 mass_erase; program {{C:\Users\jlauc\Documents\Arduino\hardware\sandeepmistry\nRF5/cores/nRF5/SDK/components/softdevice/s132/hex/s132_nrf52_2.0.1_softdevice.hex}} verify reset; shutdown; Open On-Chip Debugger 0.10.0-dev-00254-g696fc0a (2016-04-10-10:13) Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html debug_level: 2 Error while burning bootloader. 0 adapter speed: 10000 kHz cortex_m reset_config sysresetreq jaylink: Failed to open device: LIBUSB_ERROR_NOT_SUPPORTED. Info : No device selected, using first device. Error: No J-Link device found. --eraseall fine.

KEranda commented 3 years ago

@JLOCK1776 did you figure this out? I recently formatted my PC and when I set it up again I've been getting this error...

EDIT: Nevermind I solved it. For anyone experiencing the same: Don't forget to do Driver Setup for Segger J-Link if using the nRFDK. See here for instructions: https://github.com/sandeepmistry/arduino-nRF5#driver-setup-for-segger-j-link

This does mean you can't use nrfjprog commands or SES to programme the nRF until you roll back this driver setup. How to do this is also explained in the link above.