Closed gerardwr closed 4 years ago
Hi sorry for answering late,
the problem you have is the SoftDevice version,
you need the version nr. 2.0.1 for this Arduino library. also the Bootloader needs to be compiled for that version.
you are using 6.1.1
Hi,
Thanks for your reply.
Have tried a lot of BL and SD combinations without success, so some focus is great.
I will try flashing a combination of an SD version 2.0.1 and matching bootloader.
Will report back how it goes.
In general you could use the portable arduino variant and flash the P8 "Stock" firmware. It containes the sd2 and a bootloader that trys to write to the display but it should work even when no display is connected. After that you can flash a simple sketch to it with the ability to go into bootloader mode. And from there you can flash anything else OTA or via the Arduino swd upload
That REALLY helps, thanks! I flashed the P8-stock firmware, and can now upload Arduino sketches using the NrfConnect App. See details here below.
Will try D6Flasher/DaFlasher next.
Greetings!!
I downloaded your portable Arduino variant from http://atcnetz.de/downloads/D6Arduino.rar , but it's for Windows and I'm on Mac, so I could not run it.
But I found:
So I used this openocd command:
pi@raspberrypi3:~/Mydata/Nrf52832/firstexperiments $ sudo openocd -f
interface/raspberrypi2-native.cfg -c "transport select swd" -f
target/nrf52.cfg -d2 -c init -c "reset init" -c halt -c "nrf5
mass_erase" -c "program dsd6-flashP8.bin verify" -c "flash write_bank 1
dsd6-uicr-flashP8.bin" -c "flash banks" -c "reset run" -c exit
After flashing, the device ATCdfu appeared in the NrfConnect App.
After connecting to the ActDfu device I could upload a compiled Arduino .ZIP sketch without any problem.
The sketch provides a (fake) BLE HeartRate service, my device is listed in NrfConnect App.
My Heartrate device is recognised by the NrfToolbox App.
So now I can use Arduino sketches using BLE, great!
Nice to see it works as you want :) And thank you for your very detailed description.
I am closing it now
Just for completeness:
Instead of using NrfConnect DFU to upload the Arduino sketch you can also combine flashing the P8-stock firmware and the Arduino .hex file using OpenOcd with this command:
pi@raspberrypi3:~/Mydata/Nrf52832/firstexperiments $ sudo openocd -f
interface/raspberrypi2-native.cfg -c "transport select swd" -f
target/nrf52.cfg -d2 -c init -c "reset init" -c halt -c "nrf5
mass_erase" -c "program dsd6-flashP8.bin verify" -c "program
HeartRateBLE.ino.hex" -c "flash write_bank 1 dsd6-uicr-flashP8.bin" -c
"flash banks" -c "reset run" -c exit
Hi,
Like your videos about D6Flasher and DaFlasher, thanks for sharing!
I could use your help in flashing Arduino firmware in my Nrf52832 module (E104-BT5032A nRF52832). After I want to shift to an Nrf52832 Smartwatch.
Flashing bootloader and softdevice via OpenOcd/ST-Link works OK and:
But uploading an Arduino hex file compiled for NRF52832 using NrfConnect or D6Flasher App fails every time. NrfConnect disconnects after some seconds without uploading.
I guess the bootloader+softdevice that works for micropython is not right for Arduino.
I have been reading for days and experimenting with different bootloaders, different softdevices, but without success. The BLE upload always fails.
Would be great if you could point me in the right direction, I’m not sure where my mistake is.
Greetings.
DETAILED INFO
OpenOCD command on Apple iMac:
iMac19-9:espruino gerard$ openocd -f interface/stlink-v2.cfg -f target/nrf52.cfg -d2 -c init -c "reset init" -c halt -c "nrf5 mass_erase" -c "program s132_nrf52_6.1.1_softdevice.hex verify" -c "program dsd6_nrf52832_bootloader-0.2.11-3-gfb847b9-dirty-nosd.bin verify 0x78000" -c "flash write_bank 1 dsd6-uicr.bin" -c "flash banks" -c reset -c exit
AdaDFU device appears in NrfConnect App, after connecting, I can upload the micropython binary
the micropython binary works fine using Webbluetooth in Chrome browser.
AdaDFU device appears in D6Flasher App, after connecting, I can upload the micropython binary
the micropython binary works fine using Webbluetooth in Chrome browser.