ST I-NUCLEO-LRWAN1 LoRa board
Support for the ST I-NUCLEO-LRWAN1 LoRa board shield
Description

The I-NUCLEO-LRWAN1 board provides LoRa connectivity with an SX1272 radio connected via SPI to an ultra-low power STM32L052T8. microcontroller.
For details, the schematics are available on GitHub.
Note: to use the on-board I2C sensors, the R19 and R20 shorts must be closed (soldered).
Flashing the board
To flash, one needs to use an external ST-Link programmer connected to SWD pins of the JP6 connector.
By default, the flash on the microcontroller is write protected so before being able to flash it, one needs to unlock using the following:
- Apply the following patch to the
openocd.shscript:
diff --git a/dist/tools/openocd/openocd.sh b/dist/tools/openocd/openocd.shindex c59a1939a2..0c359e438c 100755--- a/dist/tools/openocd/openocd.sh+++ b/dist/tools/openocd/openocd.sh@@ -248,6 +248,11 @@ do_flash() { -c 'init' \ -c 'targets' \ -c 'reset halt' \+ -c 'stm32lx unlock 0' \+ -c 'reset halt' \+ -c 'init' \+ -c 'targets' \+ -c 'reset halt' \ ${OPENOCD_PRE_FLASH_CMDS} \ -c 'flash write_image erase \"${IMAGE_FILE}\" ${IMAGE_OFFSET} ${IMAGE_TYPE}' \ ${OPENOCD_PRE_VERIFY_CMDS} \- Run make flash:
make BOARD=i-nucleo-lrwan1 -C examples/basic/hello-world flashThe command will fail but after that the memory will be unlocked after a
power cycle. The line added above in openocd.sh can also be removed.
- Unplug the board and replug-it: the board is now flashable normally.
Note that this unlock procedure only needs to be done once.
Accessing STDIO
STDIO is available on pin 0 and 1 on CN9 so one needs an USB to UART to connect to STDIO.
When flashing using an ST-Link, STDIO pins can be plugged directly to the RX/TX pins on the programmer, STDIO is then accessible like on any Nucleo boards.