NRF52840dongle as Radio coprocessor

167 views
Skip to first unread message

Matthias Alleman

unread,
May 21, 2021, 8:28:03 AM5/21/21
to openthread-users

Hi, I am developing an application for the nrf52840dongle which should act as a coprocessor over USB. Additionally, I would like to be able to perform DFU over USB.

I downloaded the ot-nrf528xx repository and inside this folder, I executed the following commands without bootloader support

./script/build nrf52840 USB_trans
arm-none-eabi-objcopy -O ihex output/nrf52840/bin/ot-rcp ot-rcp.hex
nrfjprog -f nrf52 --chiperase --program ot-rcp.hex –reset


The application runs like a charm on my device.

However, now I want the same application with bootloader support with the following command

./script/build nrf52840 USB_trans -DOT_BOOTLOADER=USB
arm-none-eabi-objcopy -O ihex output/nrf52840/bin/ot-rcp ot-rcp.hex
nrfjprog -f nrf52 --chiperase --program ot-rcp.hex –reset

But when I flash the ot-rcp.hex, no application starts running. Does the hex-file that I generated include the bootloader and the rcp application? Or what did I generate actually? Do I need to flash a particular bootloader hex file?

Additionally I would like to adapt the colors of an RGB led depending on the state of the USB. For instance change the color to green if USB connection has started. Am I able to know the state of the USB communication in let's say main()? 

Thank you in advance.

Jonathan Hui

unread,
May 21, 2021, 4:03:48 PM5/21/21
to Matthias Alleman, openthread-users
The nRF52840 Dongle Programming Tutorial should help with the bootloader question.

--
Jonathan Hui



--
You received this message because you are subscribed to the Google Groups "openthread-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openthread-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openthread-users/b82f3875-1ef2-4b0a-8ba3-f8ad0e068b99n%40googlegroups.com.
Message has been deleted

Jonathan Hui

unread,
Oct 29, 2021, 1:44:58 AM10/29/21
to Allen Curtis, openthread-users
I don't think the nRF Connect Programmer application allows for overwriting the bootloader.

Yes, the build command `./script/build nrf52840 USB_trans -DOT_BOOTLOADER=USB` should build with the appropriate bootloader support.

--
Jonathan Hui



On Wed, Oct 27, 2021 at 8:20 PM Allen Curtis <al...@criticalsoftwaresolutions.com> wrote:
Hello, 

I thought I followed the same procedure described by Matthais for building and programming the nRF52840 dongle. When I did this is overwrote the boot loader, bricking the dongle. The only difference is that I used the NRF Connect Programmer application vs. the command line utility. Because the dongle needs the boot loader I was under the impression that a different flash map was required.

It looks like the correct build command is: $ ./script/build nrf52840 USB_trans -DOT_BOOTLOADER=USB

Is that correct?

Gabe Kassel

unread,
Oct 29, 2021, 8:23:55 AM10/29/21
to Jonathan Hui, Allen Curtis, openthread-users
One small note, which may or may not be relevant to your setups, is that the MakerDiary nRF52840 uses a different bootloader than the various documentation anticipates for the standard dongle. 

I've successfully flashed OT artifacts onto the regular PCA10059 using nRF Connect Programmer many times. It does not overwrite the bootloader, however I have noticed flashing usually fails from the tool's perspective as the device doesn't re-enumerate fast enough. Nevertheless, the new OT build is on the device and connecting over serial works. 



--
_______

Gabe Kassel
Technology Strategist | Office of the CTO

m 770.490.0431
e  ga...@eero.com
Reply all
Reply to author
Forward
0 new messages