radino40 software
Setup toolchain (Windows PC)
Cygwin setup
On Windows PC the use of cygwin console is recommended. The following steps describe how to setup cygwin for radino40 DW1000 and radino40 DW3000 projects.
- Download latest cygwin
- https://cygwin.com/install.html -> setup-x86_64.exe
- Install cygwin
- Enable the following additional packages within cygwin installation:
- make (located at devel->make)
- bash-completion (located at shells->bash-completion)
- Optional recommended packages:
- chere (located at shells)
- Configure chere to get context menu option Bash Prompt Here
-
Run cygwin as Administrator
-
Run the following command to configure chere:
$ chere -i -t mintty -s bash
-
- Enable the following additional packages within cygwin installation:
Driver setup
- Download radino40 Bootloader driver (used by radino40 DW1000 and radino40 DW3000)
- https://ic42.de/Download/nrfconnect-driver-installer.zip (sha256sum: 8570dc48cd0c4a5c6de259340d54fb820c773d5b9e6855615be5b81ca5fa702e)
- Run nrfconnect-driver-installer.exe to install driver
radino40 DW1000 SDK
Installation
- Download latest radino40 DW1000 SDK
- extract radino40 DW1000 SDK
- it is recommended to extract the radino40 DW1000 SDK in a short path
Compile & Upload Examples
-
software examples are located within the directory ic-bootloadable-examples, e.g.:
- blinky_delay
- dw1000_ping_pong_distcalc
- ...
-
each software example contains hardware specific subfolders, e.g.:
- hardware_breakout
- for 901.550 radino40 Breakout Board
- hardware_quad_tag
- hardware_usb_stick
- ...
- hardware_breakout
-
example: compile example blinky_delay for specific hardware hardware_breakout
-
open cygwin
-
navigate to radino40DW1000SDK\ic-bootloadables-examples\blinky_delay\hardware_breakout
$ cd radino40DW1000SDK\ic-bootloadables-examples\blinky_delay\hardware_breakout
-
compile firmware
$ make clean && make -j 16
-
generate dfu image for bootloader upload
$ make dfu_generate
-
-
determine bootloader COM port
-
connect radino40 DW1000 breakout board via USB to PC
-
open device manager
- e.g. Windows 10: press Windows+X and select device manager
-
press RST-button on radino40 Breakout Board to start bootloader
-
the bootloader should be listed in the device manager as
nRF52 SDFU USB (COM3)
- (the COM port number can be different)
-
-
upload firmware using the COM port number
$ make dfu_load NRF_UTIL_COM=COM3
-
wait 3-4 seconds
-
press RST-button on radino40 Breakout Board to start bootloader
-
if upload was successful the following message will appear:
Device programmed.
-
Devices with CP210x USB
- not all hardware has the USB line connected to the USB plug. For these you need a different tool to update the firmware.
- latest version of the updater tool
- update
- follow the steps above up to step 3
- unpack the dfu_container.zip file and start the updater tool
- set the update files in the tool to the unpacked ones:
- nrf52840_xxaa.dat
- nrf52840_xxaa.bin
- Target
- all devices
- Hardware
- leave field empty
- Software from:
- any
- Software to:
- this can be any arbitrary software version string which is also written onto the device by the bootloader
- e.g. sw-1
- on subsequent uploads the software string must be different
- e.g. sw-2
- the bootloader only accepts new firmware uploads with a different software version string than the currently installed firmware
- this can be any arbitrary software version string which is also written onto the device by the bootloader
- tool: click connect device
- tool: click prepare packets
- press RST-button on the device
- tool: click start update process within 5 seconds
radino40 DW3000 SDK
Installation
- Download latest radino40 DW3000 SDK
- extract radino40 DW3000 SDK
- it is recommended to extract the radino40 DW3000 SDK in a short path
- the package contains the GNU Arm Embedded Toolchain and the Nordic nRF5 SDK, only make has to be installed, see Cygwin setup above
- README.html in the package root links the documentation of every example
NOTE: the examples build with the toolchain shipped in GCC, the automatic compiler search of the nRF5 SDK is switched off (AUTO_SEARCH_COMPILER_ARCH in project.mk). To build with a different toolchain set GNU_INSTALL_ROOT_WINDOWS and GNU_INSTALL_ROOT_POSIX in project.mk or pass them on the make command line.
Compile & Upload Examples
-
software examples are located within the package root, e.g.:
- 2_PingPong-Demo
- 3_Throughput-Demo
- 4_USB-CDC-Hello
- ...
-
each software example contains hardware specific subfolders, e.g.:
- hardware_spider_dw3000
- for 901.327 radino40 spider carrier board equipped with a radino40 DW3000
- ...
- hardware_spider_dw3000
-
example: compile example 2_PingPong-Demo for specific hardware hardware_spider_dw3000
-
open cygwin
-
navigate to radino40-DW3000-SDK\2_PingPong-Demo\hardware_spider_dw3000
$ cd radino40-DW3000-SDK\2_PingPong-Demo\hardware_spider_dw3000
-
compile firmware
$ make clean && make -j 16
-
generate dfu image for bootloader upload
$ make dfu_generate
-
-
determine bootloader COM port
-
connect the radino40 DW3000 board via USB to PC
-
open device manager
- e.g. Windows 10: press Windows+X and select device manager
-
press RST-button on the board to start bootloader
-
the bootloader should be listed in the device manager as
nRF52 SDFU USB (COM3)
- (the COM port number can be different)
-
-
upload firmware using the COM port number
$ make dfu_load NRF_UTIL_COM=COM3
-
wait 3-4 seconds
-
press RST-button on the board to start bootloader
-
if upload was successful the following message will appear:
Device programmed.
-
-
the generated dfu_container.zip can also be uploaded without the SDK, e.g. on a PC without a build environment, see Firmware-Update via USB Bootloader below
-
with a SEGGER J-Link connected the firmware can be flashed directly
$ make flash
- or by running flash.bat within the hardware directory
For hardware without the USB lines connected to the USB plug the radino40 Uart updater described in Devices with CP210x USB above can be used.
- NOTE: the updater tool has not been tested with the radino40 DW3000 yet, but should work on hardware providing the according interface.
WARNING: never run a full chip erase (make erase_all or nrfjprog --eraseall). This deletes the USB bootloader, the radio calibration data and the module license. All flashing scripts and make targets described here only erase the pages they actually write.
FiRa Positioning
The example 1_FiRa-Positioning does not have to be compiled, the firmware is shipped ready to flash. Three radino40 DW3000 boards act as FiRa anchors, an Android phone with UWB or up to eight radino40 spider tags determine their own 2D position from the distances to those anchors.
All boards - anchors and tags - run the same firmware image, the role is configured afterwards and is stored in non-volatile memory.
-
flash the firmware onto every board
-
navigate to 1_FiRa-Positioning\firmware
-
upload via USB bootloader
> flash_dfu.bat COM3
-
or with a SEGGER J-Link
> flash_jlink.bat
-
-
configure the boards
- open 1_FiRa-Positioning\tools\uwb_positioning.html in Chrome or Edge
- the tool is a single HTML file and uses the Web Serial API, no installation required
- connect each board via USB, set its address and select the operating mode
- Mode A: Multi-tag - up to 8 radino40 spider tags, approx. 2 Hz per tag
- Mode B: Phone - one Android phone, approx. 5 Hz
- Mode C: Single tag - one radino40 spider tag, approx. 5 Hz
- open 1_FiRa-Positioning\tools\uwb_positioning.html in Chrome or Edge
-
for phone positioning install 1_FiRa-Positioning\android\uwb-positioning-1.0.apk on an Android phone with UWB (Android 12 or newer)
-
place the three anchors so that they form a large triangle at roughly the same height as the mobile device
- do not place all three anchors in a straight line, the position solution degrades badly in that geometry
Details on session parameters, serial commands, LED indication and troubleshooting are described in 1_FiRa-Positioning\doc.html.
NOTE: the positioning firmware uses UWB channel 9, which is the channel supported by current Android phones.
Firmware-Update via USB Bootloader
NOTE: The following section describes how to upload a dfu_container.zip with external tools. When working with the radino40 DW1000 SDK or the radino40 DW3000 SDK this is not necessary - make dfu_load does the same from within the SDK. It is the way to go whenever only the compiled firmware is at hand, e.g. on a PC without a build environment.
Required Software
The radino40 DW1000 and the radino40 DW3000 are shipped programmed with a USB bootloader which can be used to upload new firmware.
The USB driver needs to be installed, it can be downloaded here
Also the nrf_util tool has to be downloaded from here (additional information regarding this tool can be found on nordicsemi.com or github.com)
The compiled firmware binaries are delivered within a compressed zip file dfu_container.zip.
Starting the bootloader
Enable the bootloader on the radino40 software via low on the reset pin, e.g. by pressing the RESET-Button. The radino40 software stays in bootloader mode for 2 seconds. After that the Firmware is running.
The bootloader will be recognized as a serial COM-Port, e.g. COM4.
Upload firmware with nrfutil
On a Windows PC open a Command window (cmd.exe) and navigate to the folder that contains the firmware file dfu_container.zip.
Replace COM4 with the COM-Port that your PC assigned to your device.
command to flash:
nrfutil dfu usb-serial -pkg <dfu_container.zip> -p
example:
nrfutil dfu usb-serial -pkg dfu_container.zip -p COM4 -b 115200
Start the nrfutil. The nrfutil now waits up to 10 seconds for the radino40 software to enter the bootloader.
If the nrfutil exits successfully the radino40 software is programmed.