From b74f7cdec85fabdd9dafead886eda56dc231fc6d Mon Sep 17 00:00:00 2001 From: Charles Date: Wed, 21 Jul 2021 15:41:45 +0200 Subject: [PATCH] add new boards and documentation --- README.md | 92 ++++++++++++++++++- TARGET_STM32WL/CMakeLists.txt | 2 + .../TARGET_LORA_E5_DEV_BOARD/CMakeLists.txt | 14 +++ .../TARGET_LORA_E5_MINI/CMakeLists.txt | 14 +++ TARGET_STM32WL/TARGET_RAK3172/CMakeLists.txt | 2 +- TARGET_STM32WL/TARGET_RAK3172/PinNames.h | 4 +- ...io_driver.cpp => RAK3172_radio_driver.cpp} | 0 custom_targets.json | 24 ++++- 8 files changed, 144 insertions(+), 8 deletions(-) create mode 100644 TARGET_STM32WL/TARGET_LORA_E5_DEV_BOARD/CMakeLists.txt create mode 100644 TARGET_STM32WL/TARGET_LORA_E5_MINI/CMakeLists.txt rename TARGET_STM32WL/TARGET_RAK3172/{RAK7231_radio_driver.cpp => RAK3172_radio_driver.cpp} (100%) diff --git a/README.md b/README.md index 3b53af6..b7b7142 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,13 @@ Table of Contents * [Usage](#usage) * [STM32F1](#stm32f1) * [BLUEPILL](#bluepill) +* [STM32WL](#stm32wl) + * [SeeedStudio LoRa E5](#seeed-studio-lora-e5) + * [SeeedStudio LoRa E5 Mini](#seeed-studio-lora-e5-mini) + * [SeeedStudio LoRa E5 Dev Board](#seeed-studio-lora-e5-dev-board) + * [Charles's LoRa-E5 breakout board](#charless-lora-e5-breakout-board) + * [RAK Wrirelesss RAK3172](#rak-wireless-rak3172) + * [Charles's RAK3172 breakout board](#charless-rak3172-breakout-board) * [STM32L0](#stm32l0) * [MURATA LPWAN Wireless Module](#murata-lpwan-wireless-module) * [STM32L4](#stm32l4) @@ -130,12 +137,52 @@ https://www.st.com/en/evaluation-tools/steval-stwinkt1.html ## Seeed Studio LoRa E5 + + MCU: STM32WLE5JC TARGET: LORA_E5 https://www.seeedstudio.com/LoRa-E5-Wireless-Module-p-4745.html +LoRa-E5 use only RFO_HP for TX power, so for all boards using this module you need to add this to your `mbed_app.json` on section `target_overrides` + +```json + + "LORA_E5": { + "stm32wl-lora-driver.rf_switch_config": 2 + } +``` + +## Seeed Studio LoRa E5 Mini + +TARGET: LORA_E5_MINI + +Use LoRa E5 modulen basic board with USB/Serial and headers + +https://www.seeedstudio.com/LoRa-E5-mini-STM32WLE5JC-p-4869.html + + +## Seeed Studio LoRa E5 Dev Board + + + +TARGET: LORA_E5_DEV_BOARD + +Use LoRa E5 module + +https://www.seeedstudio.com/LoRa-E5-Dev-Kit-p-4868.html + +- RS485 Modbus +- all LoRa-E5 pins exposed +- temperature sensor +- buttons +- Led +- GPIO to enable 3.3V and 5V for sensors +- some grove sonnectors (I2C, Serial, ..) +- Arduino form factor to plug shield + + ## Charles's LoRa-E5 breakout board TARGET: LORA_E5_BREAKOUT @@ -151,28 +198,65 @@ Use LoRa E5 module and added - Green Led on PB10 (LED1) reversed (1=OFF, 0=ON) - Red Led on PB5 (LED2) reversed (1=OFF, 0=ON) +for debug LEDs of breakout so you need to add this to your `mbed_app.json` on section `target_overrides` and don't forget also the `rf_switch_config` seen above + + +```json + "LORA_E5_BREAKOUT": { + "stm32wl-lora-driver.rf_switch_config": 2, + "stm32wl-lora-driver.debug_tx": "PB_5", + "stm32wl-lora-driver.debug_rx": "PB_10", + "stm32wl-lora-driver.debug_invert": 1 + } +``` + + ## RAK Wireless RAK3172 + + MCU: STM32WLE5CC TARGET: RAK3172 -https://docs.rakwireless.com/Product-Categories/WisDuo/RAK3172-Module/Datasheet/#description +RAK3172 use only RFO_HP for TX power and no TXCO so for all boards using this module you need to add this to your `mbed_app.json` on section `target_overrides` + +```json + + "RAK3172": { + "stm32wl-lora-driver.rf_switch_config": 2, + "stm32wl-lora-driver.crystal_select" : 0 + } +``` ## Charles's RAK3172 breakout board TARGET: RAK3172_BREAKOUT -TBD + + +https://github.com/hallard/RAK3172-Breakout Use RAK3172 and added - FTDI 6 pins connector (use 3.3V FTDI One, not 5V) - Exposed JTAG pins needed to flash module (PA13-SWDIO / PA14-SWCLK / RESET) -- Red Led on PA9 (LED1) reversed (1=OFF, 0=ON) -- Green Led on PA10 (LED2) reversed (1=OFF, 0=ON) +- Green Led on PA10 (LED1) reversed (1=OFF, 0=ON) +- Red Led on PA9 (LED2) reversed (1=OFF, 0=ON) - SMD CR2450 battery holder +For debug LEDs of breakout so you need to add this to your `mbed_app.json` on section `target_overrides` and don't forget also the `rf_switch_config` and `crystal_select` seen above + +```json + "RAK3172_BREAKOUT": { + "stm32wl-lora-driver.rf_switch_config": 2, + "stm32wl-lora-driver.crystal_select" : 0, + "stm32wl-lora-driver.debug_tx": "PA_10", + "stm32wl-lora-driver.debug_rx": "PA_9", + "stm32wl-lora-driver.debug_invert": 1 + } +``` + # License diff --git a/TARGET_STM32WL/CMakeLists.txt b/TARGET_STM32WL/CMakeLists.txt index 87920c6..ae9a56b 100644 --- a/TARGET_STM32WL/CMakeLists.txt +++ b/TARGET_STM32WL/CMakeLists.txt @@ -3,5 +3,7 @@ add_subdirectory(TARGET_LORA_E5 EXCLUDE_FROM_ALL) add_subdirectory(TARGET_LORA_E5_BREAKOUT EXCLUDE_FROM_ALL) +add_subdirectory(TARGET_LORA_E5_MINI EXCLUDE_FROM_ALL) +add_subdirectory(TARGET_LORA_E5_DEV_BOARD EXCLUDE_FROM_ALL) add_subdirectory(TARGET_RAK3172 EXCLUDE_FROM_ALL) add_subdirectory(TARGET_RAK3172_BREAKOUT EXCLUDE_FROM_ALL) diff --git a/TARGET_STM32WL/TARGET_LORA_E5_DEV_BOARD/CMakeLists.txt b/TARGET_STM32WL/TARGET_LORA_E5_DEV_BOARD/CMakeLists.txt new file mode 100644 index 0000000..5514e08 --- /dev/null +++ b/TARGET_STM32WL/TARGET_LORA_E5_DEV_BOARD/CMakeLists.txt @@ -0,0 +1,14 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +add_library(mbed-lora-e5-dev-board INTERFACE) + +target_include_directories(mbed-lora-e5-dev-board + INTERFACE + . +) + +target_link_libraries(mbed-lora-e5-dev-board INTERFACE + mbed-stm32wle5xc + mbed-lora-e5 +) diff --git a/TARGET_STM32WL/TARGET_LORA_E5_MINI/CMakeLists.txt b/TARGET_STM32WL/TARGET_LORA_E5_MINI/CMakeLists.txt new file mode 100644 index 0000000..bbe973b --- /dev/null +++ b/TARGET_STM32WL/TARGET_LORA_E5_MINI/CMakeLists.txt @@ -0,0 +1,14 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +add_library(mbed-lora-e5-mini INTERFACE) + +target_include_directories(mbed-lora-e5-mini + INTERFACE + . +) + +target_link_libraries(mbed-lora-e5-mini INTERFACE + mbed-stm32wle5xc + mbed-lora-e5 +) diff --git a/TARGET_STM32WL/TARGET_RAK3172/CMakeLists.txt b/TARGET_STM32WL/TARGET_RAK3172/CMakeLists.txt index dac6b28..bfb37c6 100644 --- a/TARGET_STM32WL/TARGET_RAK3172/CMakeLists.txt +++ b/TARGET_STM32WL/TARGET_RAK3172/CMakeLists.txt @@ -6,7 +6,7 @@ add_library(mbed-rak3172 INTERFACE) target_sources(mbed-rak3172 INTERFACE PeripheralPins.c - RAK7231_radio_driver.cpp + RAK3172_radio_driver.cpp ) target_include_directories(mbed-rak3172 diff --git a/TARGET_STM32WL/TARGET_RAK3172/PinNames.h b/TARGET_STM32WL/TARGET_RAK3172/PinNames.h index d889c3b..2683ef5 100644 --- a/TARGET_STM32WL/TARGET_RAK3172/PinNames.h +++ b/TARGET_STM32WL/TARGET_RAK3172/PinNames.h @@ -95,12 +95,12 @@ typedef enum { #ifdef MBED_CONF_TARGET_STDIO_UART_TX CONSOLE_TX = MBED_CONF_TARGET_STDIO_UART_TX, #else - CONSOLE_TX = PB_6, + CONSOLE_TX = PA_2, #endif #ifdef MBED_CONF_TARGET_STDIO_UART_RX CONSOLE_RX = MBED_CONF_TARGET_STDIO_UART_RX, #else - CONSOLE_RX = PB_7, + CONSOLE_RX = PA_3, #endif /**** OSCILLATOR pins ****/ diff --git a/TARGET_STM32WL/TARGET_RAK3172/RAK7231_radio_driver.cpp b/TARGET_STM32WL/TARGET_RAK3172/RAK3172_radio_driver.cpp similarity index 100% rename from TARGET_STM32WL/TARGET_RAK3172/RAK7231_radio_driver.cpp rename to TARGET_STM32WL/TARGET_RAK3172/RAK3172_radio_driver.cpp diff --git a/custom_targets.json b/custom_targets.json index 2e5d671..a08e98e 100644 --- a/custom_targets.json +++ b/custom_targets.json @@ -49,7 +49,29 @@ "macros_add": [ "LED1=PB_5", "LED2=PB_10", - "BUTTON1=PA_0" + "BUTTON1=PB_13" + ] + }, + "LORA_E5_MINI": { + "inherits": [ + "LORA_E5" + ], + "macros_add": [ + "LED1=PB_5", + "BUTTON1=PB_13" + ] + }, + "LORA_E5_DEV_BOARD": { + "inherits": [ + "LORA_E5" + ], + "macros_add": [ + "LED1=PB_5", + "EN_3V3=PA_9", + "EN_5V=PB_10", + "BUTTON1=PB_13", + "BUTTON2=PA_0", + "RS485_REDE=PB_4" ] }, "RAK3172": {