[riot-notifications] [RIOT-OS/RIOT] boards: add support for i-nucleo-lrwan1 (Arduino-like shield) (#11441)

Francisco notifications at github.com
Fri May 17 14:13:41 CEST 2019


fjmolinas approved this pull request.

Looks good to, except documentation-wise. I think some improvements are needed.

I ran 'python dist/tools/compile_and_test_for_board/compile_and_test_for_board.py --jobs 3 . i-nucleo-lrwan1 --clean-after', I get the following failing tests:

Failures during test:
- [tests/cpp11_condition_variable](tests/cpp11_condition_variable/test.failed)
- [tests/cpp11_mutex](tests/cpp11_mutex/test.failed)
- [tests/cpp11_thread](tests/cpp11_thread/test.failed)
- [tests/pkg_c25519](tests/pkg_c25519/test.failed)
- [tests/pkg_fatfs_vfs](tests/pkg_fatfs_vfs/test.failed)
- [tests/pthread_barrier](tests/pthread_barrier/test.failed)
- [tests/pthread_cooperation](tests/pthread_cooperation/test.failed)

I tested unlocking the flash too, works fine, minor documentation comments regarding this.

Tested pkg_semtech_loramac, works great!

> @@ -0,0 +1,60 @@
+/**
+ at defgroup    boards_i-nucleo-lrwan1 ST I-NUCLEO-LRWAN1 LoRa board
+ at ingroup     boards
+ at brief       Support for the ST I-NUCLEO-LRWAN1 LoRa board shield
+
+## Description

Can you Improve the doc a bit:

* follow other boards style like: http://riot-os.org/api/group__boards__pba-d-01-kw2x.html
* Add reference to stm32 doc https://www.st.com/en/evaluation-tools/i-nucleo-lrwan1.html
* include supporting images

The current doc is a little crude, this board isn't super easy to use straight out of the box, I would try to improve it a little.

> @@ -0,0 +1,60 @@
+/**
+ at defgroup    boards_i-nucleo-lrwan1 ST I-NUCLEO-LRWAN1 LoRa board
+ at ingroup     boards
+ at brief       Support for the ST I-NUCLEO-LRWAN1 LoRa board shield
+
+## Description
+
+This board provides LoRa connectivity with an SX1272 radio connected via SPI
+to an ultra-low power
+[STM32L052T8 microcontroller](https://www.st.com/en/microcontrollers-microprocessors/stm32l052t8.html).
+
+For details, the
+[schematics are available on GitHub](https://github.com/USIWP1Module/USI_I-NUCLEO-LRWAN1/blob/master/Schematics/USI%20LoRa%20Arduino%20shield_SCH_20161115-1.pdf).
+
+_Note_: to use the on-board I2C sensors, the R19 and R20 shorts must be closed

Can you add the schematic in the doc? It would make this easier to pinpoint.

> +
+## Description
+
+This board provides LoRa connectivity with an SX1272 radio connected via SPI
+to an ultra-low power
+[STM32L052T8 microcontroller](https://www.st.com/en/microcontrollers-microprocessors/stm32l052t8.html).
+
+For details, the
+[schematics are available on GitHub](https://github.com/USIWP1Module/USI_I-NUCLEO-LRWAN1/blob/master/Schematics/USI%20LoRa%20Arduino%20shield_SCH_20161115-1.pdf).
+
+_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

Add schematic image.

> ++            -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:
+```sh
+make BOARD=i-nucleo-lrwan1 -C examples/hello-world flash
+```
+- 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

Add an image.

> ++++ 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:
+```sh

remove 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:
+```sh
+make BOARD=i-nucleo-lrwan1 -C examples/hello-world flash

Add a statement saying the flash will fail but the flash memory will be unlocked after power cycle (or plugging and unplugging as you stated)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11441#pullrequestreview-238838395
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190517/2dd79201/attachment-0001.html>


More information about the notifications mailing list