![](/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@0:3b6c2ce051a6, 2019-01-18 (annotated)
- Committer:
- Helmut64
- Date:
- Fri Jan 18 15:59:46 2019 +0000
- Revision:
- 0:3b6c2ce051a6
- Child:
- 2:daf96c5f0d0e
inital checkin
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Helmut64 | 0:3b6c2ce051a6 | 1 | /* |
Helmut64 | 0:3b6c2ce051a6 | 2 | * Copyright (c) 2018 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 | |
Helmut64 | 0:3b6c2ce051a6 | 7 | |
Helmut64 | 0:3b6c2ce051a6 | 8 | |
Helmut64 | 0:3b6c2ce051a6 | 9 | #ifdef TARGET_NUCLEO_L476RG |
Helmut64 | 0:3b6c2ce051a6 | 10 | #define FEATURE_LORA |
Helmut64 | 0:3b6c2ce051a6 | 11 | |
Helmut64 | 0:3b6c2ce051a6 | 12 | #elif TARGET_DISCO_L072CZ_LRWAN1 |
Helmut64 | 0:3b6c2ce051a6 | 13 | #define FEATURE_LORA |
Helmut64 | 0:3b6c2ce051a6 | 14 | |
Helmut64 | 0:3b6c2ce051a6 | 15 | #elif TARGET_STM32L432KC |
Helmut64 | 0:3b6c2ce051a6 | 16 | #define HELTEC_STM32L4 |
Helmut64 | 0:3b6c2ce051a6 | 17 | #define FEATURE_LORA |
Helmut64 | 0:3b6c2ce051a6 | 18 | #define FEATURE_USBSERIAL |
Helmut64 | 0:3b6c2ce051a6 | 19 | #endif |
Helmut64 | 0:3b6c2ce051a6 | 20 | |
Helmut64 | 0:3b6c2ce051a6 | 21 | |
Helmut64 | 0:3b6c2ce051a6 | 22 | |
Helmut64 | 0:3b6c2ce051a6 | 23 | #if defined(TARGET_DISCO_L072CZ_LRWAN1) |
Helmut64 | 0:3b6c2ce051a6 | 24 | #define LED LED2 |
Helmut64 | 0:3b6c2ce051a6 | 25 | |
Helmut64 | 0:3b6c2ce051a6 | 26 | #define LORA_SPI_MOSI PA_7 |
Helmut64 | 0:3b6c2ce051a6 | 27 | #define LORA_SPI_MISO PA_6 |
Helmut64 | 0:3b6c2ce051a6 | 28 | #define LORA_SPI_SCLK PB_3 |
Helmut64 | 0:3b6c2ce051a6 | 29 | #define LORA_CS PA_15 |
Helmut64 | 0:3b6c2ce051a6 | 30 | #define LORA_RESET PC_0 |
Helmut64 | 0:3b6c2ce051a6 | 31 | #define LORA_DIO0 PB_4 |
Helmut64 | 0:3b6c2ce051a6 | 32 | #define LORA_DIO1 PB_1 |
Helmut64 | 0:3b6c2ce051a6 | 33 | #define LORA_DIO2 PB_0 |
Helmut64 | 0:3b6c2ce051a6 | 34 | #define LORA_DIO3 PC_13 |
Helmut64 | 0:3b6c2ce051a6 | 35 | #define LORA_DIO4 PA_5 |
Helmut64 | 0:3b6c2ce051a6 | 36 | #define LORA_DIO5 PA_4 |
Helmut64 | 0:3b6c2ce051a6 | 37 | #define LORA_ANT_RX PA_1 |
Helmut64 | 0:3b6c2ce051a6 | 38 | #define LORA_ANT_TX PC_2 |
Helmut64 | 0:3b6c2ce051a6 | 39 | #define LORA_ANT_BOOST PC_1 |
Helmut64 | 0:3b6c2ce051a6 | 40 | #define LORA_TCXO PA_12 // 32 MHz |
Helmut64 | 0:3b6c2ce051a6 | 41 | |
Helmut64 | 0:3b6c2ce051a6 | 42 | |
Helmut64 | 0:3b6c2ce051a6 | 43 | |
Helmut64 | 0:3b6c2ce051a6 | 44 | #elif defined(TARGET_NUCLEO_L476RG) // using the RFM95 board |
Helmut64 | 0:3b6c2ce051a6 | 45 | |
Helmut64 | 0:3b6c2ce051a6 | 46 | #define LORA_SPI_MOSI PC_12 |
Helmut64 | 0:3b6c2ce051a6 | 47 | #define LORA_SPI_MISO PC_11 |
Helmut64 | 0:3b6c2ce051a6 | 48 | #define LORA_SPI_SCLK PC_10 |
Helmut64 | 0:3b6c2ce051a6 | 49 | #define LORA_CS PA_0 |
Helmut64 | 0:3b6c2ce051a6 | 50 | #define LORA_RESET PA_1 |
Helmut64 | 0:3b6c2ce051a6 | 51 | #define LORA_DIO0 PD_2 // DIO0=TxDone/RXDone |
Helmut64 | 0:3b6c2ce051a6 | 52 | #define LORA_DIO1 PB_7 // |
Helmut64 | 0:3b6c2ce051a6 | 53 | #define LORA_DIO2 PC_14 // DIO2=FhssChangeChannel |
Helmut64 | 0:3b6c2ce051a6 | 54 | #define LORA_DIO3 PC_15 // DIO3=CADDone |
Helmut64 | 0:3b6c2ce051a6 | 55 | #define LORA_DIO4 PH_0 // ???? |
Helmut64 | 0:3b6c2ce051a6 | 56 | #define LORA_DIO5 NC // unused? |
Helmut64 | 0:3b6c2ce051a6 | 57 | |
Helmut64 | 0:3b6c2ce051a6 | 58 | #elif defined (HELTEC_STM32L4) |
Helmut64 | 0:3b6c2ce051a6 | 59 | |
Helmut64 | 0:3b6c2ce051a6 | 60 | #define USER_BUTTON PH_3 // boot pin |
Helmut64 | 0:3b6c2ce051a6 | 61 | #define LED PB_0 // red |
Helmut64 | 0:3b6c2ce051a6 | 62 | #define LED2 PB_1 // green |
Helmut64 | 0:3b6c2ce051a6 | 63 | #define LED1 LED |
Helmut64 | 0:3b6c2ce051a6 | 64 | |
Helmut64 | 0:3b6c2ce051a6 | 65 | #define POWER_VEXT PA_3 |
Helmut64 | 0:3b6c2ce051a6 | 66 | #define POWER_VEXT_ON 0 |
Helmut64 | 0:3b6c2ce051a6 | 67 | #define POWER_VEXT_OFF 1 |
Helmut64 | 0:3b6c2ce051a6 | 68 | |
Helmut64 | 0:3b6c2ce051a6 | 69 | |
Helmut64 | 0:3b6c2ce051a6 | 70 | #define LORA_SPI_MOSI PA_7 |
Helmut64 | 0:3b6c2ce051a6 | 71 | #define LORA_SPI_MISO PA_6 |
Helmut64 | 0:3b6c2ce051a6 | 72 | #define LORA_SPI_SCLK PA_5 |
Helmut64 | 0:3b6c2ce051a6 | 73 | #define LORA_CS PA_4 |
Helmut64 | 0:3b6c2ce051a6 | 74 | #define LORA_RESET PA_1 |
Helmut64 | 0:3b6c2ce051a6 | 75 | #define LORA_DIO0 PA_0 // DIO0=TxDone/RXDone/CADDone |
Helmut64 | 0:3b6c2ce051a6 | 76 | #define LORA_DIO1 NC // |
Helmut64 | 0:3b6c2ce051a6 | 77 | #define LORA_DIO2 NC // |
Helmut64 | 0:3b6c2ce051a6 | 78 | #define LORA_DIO3 NC // |
Helmut64 | 0:3b6c2ce051a6 | 79 | #define LORA_DIO4 NC // |
Helmut64 | 0:3b6c2ce051a6 | 80 | #define LORA_DIO5 NC // |
Helmut64 | 0:3b6c2ce051a6 | 81 | |
Helmut64 | 0:3b6c2ce051a6 | 82 | #elif defined(TARGET_NUCLEO_L432KC) // using the RFM95 board |
Helmut64 | 0:3b6c2ce051a6 | 83 | |
Helmut64 | 0:3b6c2ce051a6 | 84 | // #define LED PB_3 // green |
Helmut64 | 0:3b6c2ce051a6 | 85 | #define LED PB_5 // green |
Helmut64 | 0:3b6c2ce051a6 | 86 | |
Helmut64 | 0:3b6c2ce051a6 | 87 | #define LORA_SPI_MOSI PA_7 |
Helmut64 | 0:3b6c2ce051a6 | 88 | #define LORA_SPI_MISO PA_6 |
Helmut64 | 0:3b6c2ce051a6 | 89 | #define LORA_SPI_SCLK PB_5 |
Helmut64 | 0:3b6c2ce051a6 | 90 | #define LORA_CS PA_4 |
Helmut64 | 0:3b6c2ce051a6 | 91 | #define LORA_RESET PA_1 |
Helmut64 | 0:3b6c2ce051a6 | 92 | #define LORA_DIO0 PA_0 // DIO0=TxDone/RXDone/CADDone |
Helmut64 | 0:3b6c2ce051a6 | 93 | #define LORA_DIO1 NC // |
Helmut64 | 0:3b6c2ce051a6 | 94 | #define LORA_DIO2 NC // |
Helmut64 | 0:3b6c2ce051a6 | 95 | #define LORA_DIO3 NC // |
Helmut64 | 0:3b6c2ce051a6 | 96 | #define LORA_DIO4 NC // |
Helmut64 | 0:3b6c2ce051a6 | 97 | #define LORA_DIO5 NC // |
Helmut64 | 0:3b6c2ce051a6 | 98 | |
Helmut64 | 0:3b6c2ce051a6 | 99 | |
Helmut64 | 0:3b6c2ce051a6 | 100 | #else |
Helmut64 | 0:3b6c2ce051a6 | 101 | |
Helmut64 | 0:3b6c2ce051a6 | 102 | #error "unknown board" |
Helmut64 | 0:3b6c2ce051a6 | 103 | |
Helmut64 | 0:3b6c2ce051a6 | 104 | #endif |