The Seeed Wio-WM1110 Dev Kit is an nRF52840-based LoRa® transceiver with built-in GPS, Temperature/Humidity sensor and supports solar and battery power.
Unfortunately, unlike many Meshtastic devices, this board cannot be flashed using USB. Instead, you require an external device that can connect via SWDIO.
Luckily, if you have a Raspberry Pi around this is surprisingly straightforward.
1. Set up Wiring
Connect GPIO pin 11 on your Raspbery Pi to the CLK pin on the Wio-WM1110.
Connect GPIO pin 8 on your Raspbery Pi to the DIO pin on the Wio-WM1110.
Ensure you get the GPIO numbers correct.
Plug in your Raspberry Pi to USB power.
Plug in the Wio-WM1110 to USB for power.
2. Install OpenOCD
OpenOCD is the program we'll use for communicating with the Wio-WM1110. Install it on your Raspberry Pi.
$ sudo apt update
$ sudo apt install libtool autoconf automake texinfo telnet gdb-multiarch git
$ git clone git://repo.or.cz/openocd.git
$ cd openocd/
$ ./bootstrap
$ ./configure --enable-bcm2835gpio
$ make -j4
$ sudo make install
3. Check connection
Open On-Chip Debugger 0.12.0+dev-00633-gad87fbd1c
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
srst_only separate srst_gates_jtag srst_push_pull connect_deassert_srst
swd
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : BCM2835 GPIO JTAG/SWD bitbang driver
Info : clock speed 100 kHz
Info : SWD DPIDR 0x2ba01477
Info : [nrf52.cpu] Cortex-M4 r0p1 processor detected
Info : [nrf52.cpu] target has 6 breakpoints, 4 watchpoints
Info : [nrf52.cpu] Examination succeed
Info : [nrf52.cpu] starting gdb server on 3333
Info : Listening on port 3333 for gdb connections
Info : accepting 'telnet' connection on tcp/4444
4. Obtaining Firmware
5. Flashing Firmware
$ telnet 127.0.0.1 4444
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
Open On-Chip Debugger
> init
> reset init
[nrf52.cpu] halted due to undefined, current mode: Thread
xPSR: 0x61000000 pc: 0x00025fde msp: 0x200013c0
> halt
> nrf5 mass_erase
nRF52840-QI/CAAA(build code: D0) 1024kB Flash, 256kB RAM
Mass erase completed.
> program new2.uf2 verify
[nrf52.cpu] halted due to undefined, current mode: Thread
xPSR: 0x61000000 pc: 0x00025fde msp: 0x200013c0
** Programming Started **
Padding image section 0 at 0x00000b00 with 1280 bytes
Padding image section 1 at 0x00026498 with 2920 bytes
Adding extra erase range, 0x000c9eac .. 0x000c9fff
** Programming Finished **
** Verify Started **
** Verified OK **
>
> reset
[nrf52.cpu] halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x2000002e msp: 0x200013c0
> exit 0
6. Connecting
Credits
Many thanks to Peter Pan from Seeed, and misaz from the Element14 community for their tutorials, and Mark Birss from Meshtastic for the assistance.
Comments
Post a Comment