UPDATE: Adafruit has made extensive changes to the CircuitPython BLE library. Please see my website for updated code (link in description).
@xt1200z1
3 жыл бұрын
Just saw that as I downloaded again today. Not sure others know, but I was able to put this board after your excellent tutorial into arduino and after adafruit library install, setup as board = adafruit ItsyBitsy nRF52840 express. Loaded several of my programs to test. Also when you do this it renames the SD nrf52.. and deletes the contents, so if you want to go back to CircuitPython, save your SD contents and will have to rename it CIRCUITPY for python.
@duckythescientist Жыл бұрын
Thank you so much! I've been fighting this for hours trying to get pyocd and/or adafruit-nrfutil to work.
@Davedarko2 жыл бұрын
This video helped me grasp a bit more what this openOCD does, even though I don't know why it needs to be a server thing for all of that
@aaronacj5 жыл бұрын
These are some of the best tutorials... don't stop.
@jerobins
5 жыл бұрын
ditto.
@xt1200z13 жыл бұрын
Really good job, all works as shown. This is my first py coding, lot to learn, but nice to get a positive result from your code and tutorial!!
@damny0utoobe3 жыл бұрын
Really good tutorial. I need to get started with openocd with rpi.
@jerobins5 жыл бұрын
Neat board and awesome tutorial on using OpenOCD with a Pi to make it usable for us folks without JTAG debuggers. Thanks!
@wei482213 жыл бұрын
Thank you for this great tutorial.
@rsyoung015 жыл бұрын
Best tutorial on KZread. :-)
@RuiRex4 жыл бұрын
Very good tutorial! Great work! Thanks!
@drewvigne4 жыл бұрын
Look into the JLink Mini. 20 bucks. Same functionality.
@starlinkpk17 күн бұрын
Bro please let me know I have feather nrf52840 board can it be use as ble sniffer like nrf52840 USB dongle, I have j-link JTAG programmer ( Chinese clone and st-link v2 )
@sohaib6828 Жыл бұрын
If i need to use this dongle just as a transceiver for my Raspberry Pi, do i need to just plug in to the USB port ?
@pablokoval66782 жыл бұрын
Can the flashing be done to a 3rd party nrf52840 module like the minew ms88sf23?
@pisoiorfan3 жыл бұрын
if anyone wonders what bcm2835_speed_coeffs should enter for Pi 3A+ they only need to double the 700MHz values: # Raspi3 A+ BCM2837 (1400 MHz) bcm2835gpio_speed_coeffs 227428 56
@pisoiorfan4 жыл бұрын
This is probably the only comprehensive tutorial I found on how to get over the signed bootloader nightmare. The problem wasn't only they locked in the bootloader, but this information is hidden so deep that being unfamiliar with nrf stuff it took me ages to figure out wtf is going on? That's a bad taste for anyone trying to "chew" nrf products for the first time. I also have a question - can I use st-link v2 programmer with openocd on linux64 instead of getting through a whole raspberry pi compile& setup cycle?
@rdagger
4 жыл бұрын
I haven’t tried, but it should work.
@ericfranc3 жыл бұрын
Hi, Is anyone experiencing some instability on that board? , I have often the board coming back to NRF52BOOT. I wonder if I should reupload the hex. I am using it with both MicroPython and Arduino IDE.
@rdagger
3 жыл бұрын
I think the PCA10059 dongle only has 1 MB of flash. I encountered memory issues with larger MicroPython programs using the dongle. I switched to the Adafruit nRF52840 feather because it comes with an additional 2 MB of QSPI flash. I find the Adafruit boards to be very stable and reliable.
@notsonominal4 жыл бұрын
Any reason you didn't utilize the already built in bootloader with `nrfutil pkg generate` to make a dfu.zip and `nrfutil dfu usb-serial` to flash it?
@rdagger
4 жыл бұрын
As mentioned at 1:50, the bootloader requires DFU updates to be signed.
@SouthVisionMG3 жыл бұрын
Thank you for the tutorial, but can you tell me if by using the JLink I can flash Zephyr RTOS onto the NRF52840 dongle ? Thank you !
@rdagger
3 жыл бұрын
I have never tried Zephyr but based on their website, I would guess yes: docs.zephyrproject.org/latest/boards/arm/nrf52840dongle_nrf52840/doc/index.html
@MikeNewham5 жыл бұрын
Great tutorial! Unfortunately - I got a 'smaller' verified amount of bytes while writing to - and - verifying the flashed nRF52840-dongle (at 9:59). Everything up to that point being a carbon-copy of your own command line outputs. A paste of my output is below - > nrf5 mass_erase nRF52840-QIAA(build code: C0) 1024kB Flash > flash write_image /home/pi/Downloads/pca10059_bootloader-0.2.10_s140_6.1.1.hex using fast async flash loader. This is currently supported only with ST-Link and CMSIS-DAP. If you have issues, add "set WORKAREASIZE 0" before sourcing nrf51.cfg/nrf52.cfg to disable it wrote 632 bytes from file /home/pi/Downloads/pca10059_bootloader-0.2.10_s140_6.1.1.hex in 0.118851s (5.193 KiB/s) > verify_image /home/pi/Downloads/pca10059_bootloader-0.2.10_s140_6.1.1.hex verified 632 bytes in 0.018797s (32.834 KiB/s) The newer hexfile itself is 502kb long and is the latest release 0.2.10 as found at github.com/adafruit/Adafruit_nRF52_Bootloader/releases So the upshot is that the dongle usb drive will not appear when i run the 'reset run' command. I reduced the adapter_khz value to 800 from 1000 (as mentioned at 8:23) but no success. Not sure what else to do..
@rdagger
5 жыл бұрын
I'll try flashing the latest bootloader when I get home today. Are you using the PCA10059 dongle? The SeedStudio dongle is not compatible. It's also possible that the RegOut0 register was cleared. If so, you'll need to use a level shifter. There's instructions on my website. You can lower adapter_khz more such as 100. Also keep the wires short for SWDIO and SWCLK.
@MikeNewham
5 жыл бұрын
I'll try those suggestions @@rdagger .. Error first appeared back at 6:52. I noticed no flashing LED (no LED on at all). When i ran 'sudo openocd' the following output appeared.. _______ pi@MicksPi3:~/openocd-config $ sudo openocd Open On-Chip Debugger 0.10.0+dev-00764-g92c50fda (2019-04-05-19:27) Licensed under GNU GPL v2 For bug reports, read openocd.org/doc/doxygen/bugs.html BCM2835 GPIO nums: swclk = 25, swdio = 24 adapter speed: 1000 kHz cortex_m reset_config sysresetreq Info : BCM2835 GPIO JTAG/SWD biting driver Info : SWD only mode enabled (specify tck, tms, tdi and tdo gpios to add JTAG mode) Info : clock speed 1004 kHz Info : SWD DPIDR 0x2ba01477 Info : nrf52840.cpu: hardware has 6 breakpoints, 4 watchpoints Error: nrf52840.cpu -- clearing lockup after double fault Polling target nrf52840.cpu failed, trying to reexamine Info : nrf52840.cpu: hardware has 6 breakpoints, 4 watchpoints Info : Listening on port 3333 for gdb connections TargetName Type Endian TapName State -- ------------------ ---------- ------ ------------------ ------------ 0* nrf52840.cpu cortex_m little nrf52840.cpu halted target halted due to debug-request, current mode: Thread xPSR: 00000000 pc: 0x623c3e6c msp: 0x6d74683c Info : Listening on port 6666 for tcl connections Info : Listening on port 4444 for telnet connections ______ You'll notice that it says - 'Error: nrf52840.cpu -- clearing lockup after double fault' and also the 'State' differs to yours in that mine is 'halted'. Also same error appears after i enter 'reset run' once i telnet in. Running 'reg', 'targets', and 'flash banks' also produce similar output to your own. Ta, Michael.
@rdagger
5 жыл бұрын
I loaded the UF2 Bootloader 0.2.10 using OpenOCD. I tested all the code from my last video and everything works. The OpenOCD output showed: "wrote 183928 bytes from file /home/pi/Downloads/pca10059_bootloader-0.2.10_s140_6.1.1.hex" I would try lowering adapter_khz to 100 and make sure you have good quality short jumper wires.
@maxcoldson4 жыл бұрын
Where to get the j-link needle adapter? Is that cable expensive?
@rdagger
4 жыл бұрын
I bought the plug-of-nails cable and retainer clip from Digi-Key. The cable was $39. The retainer was $6. Manufacturer part #'s: TC2050-IDC-NL and TC2050-CLIP. I etched the adapter board myself.
@ericfranc3 жыл бұрын
Thanks for the tutorial , I would not have proceed without that. Is it possible to still find the version of Circuit python you are using, it keep getting an error "ImportError: no module named 'adafruit_ble.uart'" with the latest version.
@rdagger
3 жыл бұрын
Adafruit has made extensive changes to the CircuitPython BLE library. Please see my website for updated code (link in description).
Пікірлер: 34
UPDATE: Adafruit has made extensive changes to the CircuitPython BLE library. Please see my website for updated code (link in description).
@xt1200z1
3 жыл бұрын
Just saw that as I downloaded again today. Not sure others know, but I was able to put this board after your excellent tutorial into arduino and after adafruit library install, setup as board = adafruit ItsyBitsy nRF52840 express. Loaded several of my programs to test. Also when you do this it renames the SD nrf52.. and deletes the contents, so if you want to go back to CircuitPython, save your SD contents and will have to rename it CIRCUITPY for python.
Thank you so much! I've been fighting this for hours trying to get pyocd and/or adafruit-nrfutil to work.
This video helped me grasp a bit more what this openOCD does, even though I don't know why it needs to be a server thing for all of that
These are some of the best tutorials... don't stop.
@jerobins
5 жыл бұрын
ditto.
Really good job, all works as shown. This is my first py coding, lot to learn, but nice to get a positive result from your code and tutorial!!
Really good tutorial. I need to get started with openocd with rpi.
Neat board and awesome tutorial on using OpenOCD with a Pi to make it usable for us folks without JTAG debuggers. Thanks!
Thank you for this great tutorial.
Best tutorial on KZread. :-)
Very good tutorial! Great work! Thanks!
Look into the JLink Mini. 20 bucks. Same functionality.
Bro please let me know I have feather nrf52840 board can it be use as ble sniffer like nrf52840 USB dongle, I have j-link JTAG programmer ( Chinese clone and st-link v2 )
If i need to use this dongle just as a transceiver for my Raspberry Pi, do i need to just plug in to the USB port ?
Can the flashing be done to a 3rd party nrf52840 module like the minew ms88sf23?
if anyone wonders what bcm2835_speed_coeffs should enter for Pi 3A+ they only need to double the 700MHz values: # Raspi3 A+ BCM2837 (1400 MHz) bcm2835gpio_speed_coeffs 227428 56
This is probably the only comprehensive tutorial I found on how to get over the signed bootloader nightmare. The problem wasn't only they locked in the bootloader, but this information is hidden so deep that being unfamiliar with nrf stuff it took me ages to figure out wtf is going on? That's a bad taste for anyone trying to "chew" nrf products for the first time. I also have a question - can I use st-link v2 programmer with openocd on linux64 instead of getting through a whole raspberry pi compile& setup cycle?
@rdagger
4 жыл бұрын
I haven’t tried, but it should work.
Hi, Is anyone experiencing some instability on that board? , I have often the board coming back to NRF52BOOT. I wonder if I should reupload the hex. I am using it with both MicroPython and Arduino IDE.
@rdagger
3 жыл бұрын
I think the PCA10059 dongle only has 1 MB of flash. I encountered memory issues with larger MicroPython programs using the dongle. I switched to the Adafruit nRF52840 feather because it comes with an additional 2 MB of QSPI flash. I find the Adafruit boards to be very stable and reliable.
Any reason you didn't utilize the already built in bootloader with `nrfutil pkg generate` to make a dfu.zip and `nrfutil dfu usb-serial` to flash it?
@rdagger
4 жыл бұрын
As mentioned at 1:50, the bootloader requires DFU updates to be signed.
Thank you for the tutorial, but can you tell me if by using the JLink I can flash Zephyr RTOS onto the NRF52840 dongle ? Thank you !
@rdagger
3 жыл бұрын
I have never tried Zephyr but based on their website, I would guess yes: docs.zephyrproject.org/latest/boards/arm/nrf52840dongle_nrf52840/doc/index.html
Great tutorial! Unfortunately - I got a 'smaller' verified amount of bytes while writing to - and - verifying the flashed nRF52840-dongle (at 9:59). Everything up to that point being a carbon-copy of your own command line outputs. A paste of my output is below - > nrf5 mass_erase nRF52840-QIAA(build code: C0) 1024kB Flash > flash write_image /home/pi/Downloads/pca10059_bootloader-0.2.10_s140_6.1.1.hex using fast async flash loader. This is currently supported only with ST-Link and CMSIS-DAP. If you have issues, add "set WORKAREASIZE 0" before sourcing nrf51.cfg/nrf52.cfg to disable it wrote 632 bytes from file /home/pi/Downloads/pca10059_bootloader-0.2.10_s140_6.1.1.hex in 0.118851s (5.193 KiB/s) > verify_image /home/pi/Downloads/pca10059_bootloader-0.2.10_s140_6.1.1.hex verified 632 bytes in 0.018797s (32.834 KiB/s) The newer hexfile itself is 502kb long and is the latest release 0.2.10 as found at github.com/adafruit/Adafruit_nRF52_Bootloader/releases So the upshot is that the dongle usb drive will not appear when i run the 'reset run' command. I reduced the adapter_khz value to 800 from 1000 (as mentioned at 8:23) but no success. Not sure what else to do..
@rdagger
5 жыл бұрын
I'll try flashing the latest bootloader when I get home today. Are you using the PCA10059 dongle? The SeedStudio dongle is not compatible. It's also possible that the RegOut0 register was cleared. If so, you'll need to use a level shifter. There's instructions on my website. You can lower adapter_khz more such as 100. Also keep the wires short for SWDIO and SWCLK.
@MikeNewham
5 жыл бұрын
I'll try those suggestions @@rdagger .. Error first appeared back at 6:52. I noticed no flashing LED (no LED on at all). When i ran 'sudo openocd' the following output appeared.. _______ pi@MicksPi3:~/openocd-config $ sudo openocd Open On-Chip Debugger 0.10.0+dev-00764-g92c50fda (2019-04-05-19:27) Licensed under GNU GPL v2 For bug reports, read openocd.org/doc/doxygen/bugs.html BCM2835 GPIO nums: swclk = 25, swdio = 24 adapter speed: 1000 kHz cortex_m reset_config sysresetreq Info : BCM2835 GPIO JTAG/SWD biting driver Info : SWD only mode enabled (specify tck, tms, tdi and tdo gpios to add JTAG mode) Info : clock speed 1004 kHz Info : SWD DPIDR 0x2ba01477 Info : nrf52840.cpu: hardware has 6 breakpoints, 4 watchpoints Error: nrf52840.cpu -- clearing lockup after double fault Polling target nrf52840.cpu failed, trying to reexamine Info : nrf52840.cpu: hardware has 6 breakpoints, 4 watchpoints Info : Listening on port 3333 for gdb connections TargetName Type Endian TapName State -- ------------------ ---------- ------ ------------------ ------------ 0* nrf52840.cpu cortex_m little nrf52840.cpu halted target halted due to debug-request, current mode: Thread xPSR: 00000000 pc: 0x623c3e6c msp: 0x6d74683c Info : Listening on port 6666 for tcl connections Info : Listening on port 4444 for telnet connections ______ You'll notice that it says - 'Error: nrf52840.cpu -- clearing lockup after double fault' and also the 'State' differs to yours in that mine is 'halted'. Also same error appears after i enter 'reset run' once i telnet in. Running 'reg', 'targets', and 'flash banks' also produce similar output to your own. Ta, Michael.
@rdagger
5 жыл бұрын
I loaded the UF2 Bootloader 0.2.10 using OpenOCD. I tested all the code from my last video and everything works. The OpenOCD output showed: "wrote 183928 bytes from file /home/pi/Downloads/pca10059_bootloader-0.2.10_s140_6.1.1.hex" I would try lowering adapter_khz to 100 and make sure you have good quality short jumper wires.
Where to get the j-link needle adapter? Is that cable expensive?
@rdagger
4 жыл бұрын
I bought the plug-of-nails cable and retainer clip from Digi-Key. The cable was $39. The retainer was $6. Manufacturer part #'s: TC2050-IDC-NL and TC2050-CLIP. I etched the adapter board myself.
Thanks for the tutorial , I would not have proceed without that. Is it possible to still find the version of Circuit python you are using, it keep getting an error "ImportError: no module named 'adafruit_ble.uart'" with the latest version.
@rdagger
3 жыл бұрын
Adafruit has made extensive changes to the CircuitPython BLE library. Please see my website for updated code (link in description).
@ericfranc
3 жыл бұрын
@@rdagger Thanks a lot for you help :)