![](/media/cache/profiles/ce7206100d5cf8e7bb691376c7d73526.jpg.50x50_q85.jpg)
An example project for the Heltec Turtle LoRa board (STM32L4 and SX1276 chips). The projects is only supported for the Nucleo-L432KC board platform in the mbed online and offline compiler environment. Visit www.radioshuttle.de (choose Turtle board) for instructions. Note that most source files and libraries are open source, however some files especially the RadioShuttle core protocol is copyrighted work. Check header for details.
Dependencies: mbed BufferedSerial SX1276GenericLib OLED_SSD1306 HELIOS_Si7021 NVProperty RadioShuttle-STM32L4 USBDeviceHT
PinMap.h@32:e68143c56bf3, 2019-02-12 (annotated)
- Committer:
- Helmut Tschemernjak
- Date:
- Tue Feb 12 16:52:23 2019 +0100
- Revision:
- 32:e68143c56bf3
- Parent:
- 17:a3fc679456e8
- Child:
- 37:77fa81e4ad79
Added FEATURE_LORA_PING_PONG
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Helmut64 | 0:3b6c2ce051a6 | 1 | /* |
Helmut Tschemernjak | 2:daf96c5f0d0e | 2 | * Copyright (c) 2019 Helmut Tschemernjak |
Helmut64 | 0:3b6c2ce051a6 | 3 | * 30826 Garbsen (Hannover) Germany |
Helmut64 | 0:3b6c2ce051a6 | 4 | * Licensed under the Apache License, Version 2.0); |
Helmut64 | 0:3b6c2ce051a6 | 5 | */ |
Helmut64 | 0:3b6c2ce051a6 | 6 | |
Helmut Tschemernjak | 2:daf96c5f0d0e | 7 | #define RS_MAJOR 3 |
Helmut Tschemernjak | 2:daf96c5f0d0e | 8 | #define RS_MINOR 1 |
Helmut64 | 0:3b6c2ce051a6 | 9 | |
Helmut Tschemernjak | 2:daf96c5f0d0e | 10 | #ifdef TARGET_STM32L432KC |
Helmut Tschemernjak | 32:e68143c56bf3 | 11 | #define HELTECL432_REV1 |
Helmut Tschemernjak | 32:e68143c56bf3 | 12 | #define FEATURE_LORA |
Helmut Tschemernjak | 32:e68143c56bf3 | 13 | #define FEATURE_LORA_PING_PONG |
Helmut Tschemernjak | 32:e68143c56bf3 | 14 | #define FEATURE_USBSERIAL |
Helmut Tschemernjak | 32:e68143c56bf3 | 15 | #define FEATURE_NVPROPERTY |
Helmut Tschemernjak | 32:e68143c56bf3 | 16 | #define FEATURE_NVPROPERTYEDITOR |
Helmut64 | 0:3b6c2ce051a6 | 17 | #endif |
Helmut64 | 0:3b6c2ce051a6 | 18 | |
Helmut Tschemernjak | 2:daf96c5f0d0e | 19 | #ifdef HELTECL432_REV1 |
Helmut Tschemernjak | 2:daf96c5f0d0e | 20 | #define USER_BUTTON (PinName) 0x73 // PH_3 boot pin |
Helmut Tschemernjak | 2:daf96c5f0d0e | 21 | #define USER_BUTTON_RISE |
Helmut Tschemernjak | 2:daf96c5f0d0e | 22 | #define STATUS_LED PB_1 // green LED |
Helmut Tschemernjak | 2:daf96c5f0d0e | 23 | #define LED2 PB_0 // red LED |
Helmut Tschemernjak | 2:daf96c5f0d0e | 24 | #define LED STATUS_LED |
Helmut Tschemernjak | 2:daf96c5f0d0e | 25 | #define BATPOWER_EN PA_8 // high indicates power source is battery, removable bridge |
Helmut Tschemernjak | 2:daf96c5f0d0e | 26 | #define BATPOWER_EXT 1 |
Helmut64 | 0:3b6c2ce051a6 | 27 | |
Helmut Tschemernjak | 2:daf96c5f0d0e | 28 | #define SPI_LSM_MOSI PA_7 |
Helmut Tschemernjak | 2:daf96c5f0d0e | 29 | #define SPI_LSM_MISO PA_6 |
Helmut Tschemernjak | 2:daf96c5f0d0e | 30 | #define SPI_LSM_SCLK PA_5 |
Helmut Tschemernjak | 2:daf96c5f0d0e | 31 | #define CS_FLASH NC |
Helmut64 | 0:3b6c2ce051a6 | 32 | |
Helmut Tschemernjak | 2:daf96c5f0d0e | 33 | #define EXT_POWER_SW PA_3 // VEXT on/off |
Helmut Tschemernjak | 2:daf96c5f0d0e | 34 | #define EXT_POWER_ON 0 |
Helmut Tschemernjak | 2:daf96c5f0d0e | 35 | #define EXT_POWER_OFF 1 |
Helmut64 | 0:3b6c2ce051a6 | 36 | |
Helmut Tschemernjak | 2:daf96c5f0d0e | 37 | #define LORA_SPI_MOSI SPI_LSM_MOSI |
Helmut Tschemernjak | 2:daf96c5f0d0e | 38 | #define LORA_SPI_MISO SPI_LSM_MISO |
Helmut Tschemernjak | 2:daf96c5f0d0e | 39 | #define LORA_SPI_SCLK SPI_LSM_SCLK |
Helmut Tschemernjak | 2:daf96c5f0d0e | 40 | #define LORA_CS PA_4 |
Helmut64 | 0:3b6c2ce051a6 | 41 | #define LORA_RESET PA_1 |
Helmut Tschemernjak | 2:daf96c5f0d0e | 42 | #define LORA_DIO0 PA_0 // used for Rx, Tx Interrupt |
Helmut Tschemernjak | 2:daf96c5f0d0e | 43 | #define LORA_DIO1 NC // PB_6Fifo Level/Full, RxTimeout/Cad Detection Interrupt, unused in RadioShuttle |
Helmut Tschemernjak | 2:daf96c5f0d0e | 44 | #define LORA_DIO2 NC // FhssChangeChannel when FreqHop is on, unused in RadioShuttle |
Helmut Tschemernjak | 2:daf96c5f0d0e | 45 | #define LORA_DIO3 NC // optionally Cad Detection in RS_Node_Offline/Checking mode |
Helmut Tschemernjak | 2:daf96c5f0d0e | 46 | #define LORA_DIO4 NC // FSK mode preamble detected, unused in RadioShuttle |
Helmut Tschemernjak | 2:daf96c5f0d0e | 47 | #define LORA_DIO5 NC // FSK mode ready / ClockOut, unused in RadioShuttle |
Helmut Tschemernjak | 2:daf96c5f0d0e | 48 | #define LORA_ANT_PWR EXT_POWER_SW // the analog switch is getting turned off go save energy |
Helmut64 | 0:3b6c2ce051a6 | 49 | |
Helmut Tschemernjak | 2:daf96c5f0d0e | 50 | /* this following are available pins for custom use */ |
Helmut Tschemernjak | 2:daf96c5f0d0e | 51 | #define P_SWLCK PA_14 // available only when no debugger is being used. |
Helmut Tschemernjak | 2:daf96c5f0d0e | 52 | #define P_SWDIO PA_13 // available only when no debugger is being used |
Helmut Tschemernjak | 2:daf96c5f0d0e | 53 | #define P_SWO PB_3 // available only when no SWO debugging output is being used |
Helmut Tschemernjak | 2:daf96c5f0d0e | 54 | #define P_PA_2_TX PA_2 // available only when no debug serial console is being used |
Helmut Tschemernjak | 2:daf96c5f0d0e | 55 | #define P_PA_15_RX PA_15 // available only when no debug serial console is being used |
Helmut Tschemernjak | 2:daf96c5f0d0e | 56 | #define P_PA_9_SCL PA_9 // SCL includes 10k removable hardware pullup |
Helmut Tschemernjak | 2:daf96c5f0d0e | 57 | #define P_PA_10_SCA PA_10 // SCL includes 10k removable hardware pullup |
Helmut Tschemernjak | 2:daf96c5f0d0e | 58 | #define P_PB_4 PB_4 |
Helmut Tschemernjak | 2:daf96c5f0d0e | 59 | #define P_PB_5 PB_5 |
Helmut Tschemernjak | 2:daf96c5f0d0e | 60 | #define P_PB_6 PB_6 |
Helmut Tschemernjak | 2:daf96c5f0d0e | 61 | #define P_PB_7 PB_7 |
Helmut64 | 0:3b6c2ce051a6 | 62 | |
Helmut Tschemernjak | 2:daf96c5f0d0e | 63 | #define WatchDogUpdate() void() |
Helmut64 | 0:3b6c2ce051a6 | 64 | |
Helmut Tschemernjak | 2:daf96c5f0d0e | 65 | #else |
Helmut Tschemernjak | 2:daf96c5f0d0e | 66 | #error "unknown board" |
Helmut Tschemernjak | 2:daf96c5f0d0e | 67 | #endif |