MAX32625PICO LP0 mode
Dependencies: SX1276GenericLib USBDevice
Fork of PICO_LP0 by
PinMap.h@7:c92ed2d6e344, 2020-10-16 (annotated)
- Committer:
- walterluu
- Date:
- Fri Oct 16 06:48:08 2020 +0000
- Revision:
- 7:c92ed2d6e344
- Parent:
- 3:85fc843a9d7d
MAX32625PICO LP0 mode;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
walterluu | 0:664d9df11a00 | 1 | /* |
walterluu | 0:664d9df11a00 | 2 | * Copyright (c) 2018 Helmut Tschemernjak |
walterluu | 0:664d9df11a00 | 3 | * 30826 Garbsen (Hannover) Germany |
walterluu | 0:664d9df11a00 | 4 | * Licensed under the Apache License, Version 2.0); |
walterluu | 0:664d9df11a00 | 5 | */ |
walterluu | 0:664d9df11a00 | 6 | |
walterluu | 0:664d9df11a00 | 7 | |
walterluu | 0:664d9df11a00 | 8 | |
walterluu | 0:664d9df11a00 | 9 | #ifdef TARGET_NUCLEO_L476RG |
walterluu | 0:664d9df11a00 | 10 | #define FEATURE_LORA |
walterluu | 0:664d9df11a00 | 11 | |
walterluu | 0:664d9df11a00 | 12 | #elif TARGET_DISCO_L072CZ_LRWAN1 |
walterluu | 0:664d9df11a00 | 13 | #define FEATURE_LORA |
walterluu | 0:664d9df11a00 | 14 | |
walterluu | 0:664d9df11a00 | 15 | #elif TARGET_STM32L432KC |
walterluu | 0:664d9df11a00 | 16 | #define HELTEC_STM32L4 |
walterluu | 0:664d9df11a00 | 17 | #define FEATURE_LORA |
walterluu | 0:664d9df11a00 | 18 | #define FEATURE_USBSERIAL |
walterluu | 0:664d9df11a00 | 19 | #endif |
walterluu | 0:664d9df11a00 | 20 | |
walterluu | 0:664d9df11a00 | 21 | |
walterluu | 0:664d9df11a00 | 22 | |
walterluu | 0:664d9df11a00 | 23 | #if defined(TARGET_DISCO_L072CZ_LRWAN1) |
walterluu | 0:664d9df11a00 | 24 | #define LED LED2 |
walterluu | 0:664d9df11a00 | 25 | |
walterluu | 0:664d9df11a00 | 26 | #define LORA_SPI_MOSI PA_7 |
walterluu | 0:664d9df11a00 | 27 | #define LORA_SPI_MISO PA_6 |
walterluu | 0:664d9df11a00 | 28 | #define LORA_SPI_SCLK PB_3 |
walterluu | 0:664d9df11a00 | 29 | #define LORA_CS PA_15 |
walterluu | 0:664d9df11a00 | 30 | #define LORA_RESET PC_0 |
walterluu | 0:664d9df11a00 | 31 | #define LORA_DIO0 PB_4 |
walterluu | 0:664d9df11a00 | 32 | #define LORA_DIO1 PB_1 |
walterluu | 0:664d9df11a00 | 33 | #define LORA_DIO2 PB_0 |
walterluu | 0:664d9df11a00 | 34 | #define LORA_DIO3 PC_13 |
walterluu | 0:664d9df11a00 | 35 | #define LORA_DIO4 PA_5 |
walterluu | 0:664d9df11a00 | 36 | #define LORA_DIO5 PA_4 |
walterluu | 0:664d9df11a00 | 37 | #define LORA_ANT_RX PA_1 |
walterluu | 0:664d9df11a00 | 38 | #define LORA_ANT_TX PC_2 |
walterluu | 0:664d9df11a00 | 39 | #define LORA_ANT_BOOST PC_1 |
walterluu | 0:664d9df11a00 | 40 | #define LORA_TCXO PA_12 // 32 MHz |
walterluu | 0:664d9df11a00 | 41 | |
walterluu | 0:664d9df11a00 | 42 | |
walterluu | 0:664d9df11a00 | 43 | |
walterluu | 0:664d9df11a00 | 44 | #elif defined(TARGET_NUCLEO_L476RG) // using the RFM95 board |
walterluu | 0:664d9df11a00 | 45 | |
walterluu | 0:664d9df11a00 | 46 | #define LORA_SPI_MOSI PC_12 |
walterluu | 0:664d9df11a00 | 47 | #define LORA_SPI_MISO PC_11 |
walterluu | 0:664d9df11a00 | 48 | #define LORA_SPI_SCLK PC_10 |
walterluu | 0:664d9df11a00 | 49 | #define LORA_CS PA_0 |
walterluu | 0:664d9df11a00 | 50 | #define LORA_RESET PA_1 |
walterluu | 0:664d9df11a00 | 51 | #define LORA_DIO0 PD_2 // DIO0=TxDone/RXDone |
walterluu | 0:664d9df11a00 | 52 | #define LORA_DIO1 PB_7 // |
walterluu | 0:664d9df11a00 | 53 | #define LORA_DIO2 PC_14 // DIO2=FhssChangeChannel |
walterluu | 0:664d9df11a00 | 54 | #define LORA_DIO3 PC_15 // DIO3=CADDone |
walterluu | 0:664d9df11a00 | 55 | #define LORA_DIO4 PH_0 // ???? |
walterluu | 0:664d9df11a00 | 56 | #define LORA_DIO5 NC // unused? |
walterluu | 0:664d9df11a00 | 57 | |
walterluu | 0:664d9df11a00 | 58 | #elif defined (HELTEC_STM32L4) |
walterluu | 0:664d9df11a00 | 59 | |
walterluu | 0:664d9df11a00 | 60 | #define USER_BUTTON PH_3 // boot pin |
walterluu | 0:664d9df11a00 | 61 | #define LED PB_0 // red |
walterluu | 0:664d9df11a00 | 62 | #define LED2 PB_1 // green |
walterluu | 0:664d9df11a00 | 63 | #define LED1 LED |
walterluu | 0:664d9df11a00 | 64 | |
walterluu | 0:664d9df11a00 | 65 | #define POWER_VEXT PA_3 |
walterluu | 0:664d9df11a00 | 66 | #define POWER_VEXT_ON 0 |
walterluu | 0:664d9df11a00 | 67 | #define POWER_VEXT_OFF 1 |
walterluu | 0:664d9df11a00 | 68 | |
walterluu | 0:664d9df11a00 | 69 | |
walterluu | 0:664d9df11a00 | 70 | #define LORA_SPI_MOSI PA_7 |
walterluu | 0:664d9df11a00 | 71 | #define LORA_SPI_MISO PA_6 |
walterluu | 0:664d9df11a00 | 72 | #define LORA_SPI_SCLK PA_5 |
walterluu | 0:664d9df11a00 | 73 | #define LORA_CS PA_4 |
walterluu | 0:664d9df11a00 | 74 | #define LORA_RESET PA_1 |
walterluu | 0:664d9df11a00 | 75 | #define LORA_DIO0 PA_0 // DIO0=TxDone/RXDone/CADDone |
walterluu | 0:664d9df11a00 | 76 | #define LORA_DIO1 NC // |
walterluu | 0:664d9df11a00 | 77 | #define LORA_DIO2 NC // |
walterluu | 0:664d9df11a00 | 78 | #define LORA_DIO3 NC // |
walterluu | 0:664d9df11a00 | 79 | #define LORA_DIO4 NC // |
walterluu | 0:664d9df11a00 | 80 | #define LORA_DIO5 NC // |
walterluu | 0:664d9df11a00 | 81 | |
walterluu | 0:664d9df11a00 | 82 | #elif defined(TARGET_NUCLEO_L432KC) // using the RFM95 board |
walterluu | 0:664d9df11a00 | 83 | |
walterluu | 0:664d9df11a00 | 84 | // #define LED PB_3 // green |
walterluu | 0:664d9df11a00 | 85 | #define LED PB_5 // green |
walterluu | 0:664d9df11a00 | 86 | |
walterluu | 0:664d9df11a00 | 87 | #define LORA_SPI_MOSI PA_7 |
walterluu | 0:664d9df11a00 | 88 | #define LORA_SPI_MISO PA_6 |
walterluu | 0:664d9df11a00 | 89 | #define LORA_SPI_SCLK PB_5 |
walterluu | 0:664d9df11a00 | 90 | #define LORA_CS PA_4 |
walterluu | 0:664d9df11a00 | 91 | #define LORA_RESET PA_1 |
walterluu | 0:664d9df11a00 | 92 | #define LORA_DIO0 PA_0 // DIO0=TxDone/RXDone/CADDone |
walterluu | 0:664d9df11a00 | 93 | #define LORA_DIO1 NC // |
walterluu | 0:664d9df11a00 | 94 | #define LORA_DIO2 NC // |
walterluu | 0:664d9df11a00 | 95 | #define LORA_DIO3 NC // |
walterluu | 0:664d9df11a00 | 96 | #define LORA_DIO4 NC // |
walterluu | 0:664d9df11a00 | 97 | #define LORA_DIO5 NC // |
walterluu | 0:664d9df11a00 | 98 | |
walterluu | 0:664d9df11a00 | 99 | |
walterluu | 0:664d9df11a00 | 100 | #elif defined(TARGET_NUCLEO_F411RE) // using the RFM95 board |
walterluu | 0:664d9df11a00 | 101 | |
walterluu | 0:664d9df11a00 | 102 | #define LED LED1 // green |
walterluu | 0:664d9df11a00 | 103 | |
walterluu | 0:664d9df11a00 | 104 | #define LORA_SPI_MOSI PC_12 |
walterluu | 0:664d9df11a00 | 105 | #define LORA_SPI_MISO PC_11 |
walterluu | 0:664d9df11a00 | 106 | #define LORA_SPI_SCLK PC_10 |
walterluu | 0:664d9df11a00 | 107 | #define LORA_CS PA_0 |
walterluu | 0:664d9df11a00 | 108 | #define LORA_RESET PA_1 |
walterluu | 0:664d9df11a00 | 109 | #define LORA_DIO0 PD_2 // DIO0=TxDone/RXDone |
walterluu | 0:664d9df11a00 | 110 | #define LORA_DIO1 PB_7 // |
walterluu | 0:664d9df11a00 | 111 | #define LORA_DIO2 PC_14 // DIO2=FhssChangeChannel |
walterluu | 0:664d9df11a00 | 112 | #define LORA_DIO3 PC_15 // DIO3=CADDone |
walterluu | 0:664d9df11a00 | 113 | #define LORA_DIO4 PH_0 // ???? |
walterluu | 0:664d9df11a00 | 114 | #define LORA_DIO5 NC // unused? |
walterluu | 0:664d9df11a00 | 115 | |
walterluu | 0:664d9df11a00 | 116 | |
walterluu | 0:664d9df11a00 | 117 | #elif defined(TARGET_MAX32630FTHR) // using the RFM95 board |
walterluu | 0:664d9df11a00 | 118 | |
walterluu | 0:664d9df11a00 | 119 | // #define LED PB_3 // green |
walterluu | 0:664d9df11a00 | 120 | #define LED LED2 // green |
walterluu | 0:664d9df11a00 | 121 | |
walterluu | 0:664d9df11a00 | 122 | #define LORA_SPI_MOSI P5_1 |
walterluu | 0:664d9df11a00 | 123 | #define LORA_SPI_MISO P5_2 |
walterluu | 0:664d9df11a00 | 124 | #define LORA_SPI_SCLK P5_0 |
walterluu | 0:664d9df11a00 | 125 | #define LORA_CS P3_0 |
walterluu | 0:664d9df11a00 | 126 | #define LORA_RESET P3_1 |
walterluu | 0:664d9df11a00 | 127 | #define LORA_DIO0 P3_2 // DIO0=TxDone/RXDone/CADDone |
walterluu | 0:664d9df11a00 | 128 | #define LORA_DIO1 NC // |
walterluu | 0:664d9df11a00 | 129 | #define LORA_DIO2 NC // |
walterluu | 0:664d9df11a00 | 130 | #define LORA_DIO3 NC // |
walterluu | 0:664d9df11a00 | 131 | #define LORA_DIO4 NC // |
walterluu | 0:664d9df11a00 | 132 | #define LORA_DIO5 NC // |
walterluu | 0:664d9df11a00 | 133 | |
walterluu | 0:664d9df11a00 | 134 | #elif defined(TARGET_MAX32620FTHR) // using the RFM95 board |
walterluu | 0:664d9df11a00 | 135 | |
walterluu | 0:664d9df11a00 | 136 | // #define LED PB_3 // green |
walterluu | 0:664d9df11a00 | 137 | #define LED LED2 // green |
walterluu | 0:664d9df11a00 | 138 | |
walterluu | 0:664d9df11a00 | 139 | #define LORA_SPI_MOSI P5_1 |
walterluu | 0:664d9df11a00 | 140 | #define LORA_SPI_MISO P5_2 |
walterluu | 0:664d9df11a00 | 141 | #define LORA_SPI_SCLK P5_0 |
walterluu | 0:664d9df11a00 | 142 | #define LORA_CS P3_0 |
walterluu | 0:664d9df11a00 | 143 | #define LORA_RESET P3_1 |
walterluu | 0:664d9df11a00 | 144 | #define LORA_DIO0 P3_2 // DIO0=TxDone/RXDone/CADDone |
walterluu | 0:664d9df11a00 | 145 | #define LORA_DIO1 NC // |
walterluu | 0:664d9df11a00 | 146 | #define LORA_DIO2 NC // |
walterluu | 0:664d9df11a00 | 147 | #define LORA_DIO3 NC // |
walterluu | 0:664d9df11a00 | 148 | #define LORA_DIO4 NC // |
walterluu | 0:664d9df11a00 | 149 | #define LORA_DIO5 NC // |
walterluu | 0:664d9df11a00 | 150 | |
walterluu | 3:85fc843a9d7d | 151 | #elif defined(TARGET_MAX32625PICO) // using the RFM95 board |
walterluu | 3:85fc843a9d7d | 152 | |
walterluu | 3:85fc843a9d7d | 153 | // #define LED PB_3 // green |
walterluu | 3:85fc843a9d7d | 154 | #define LED LED2 // green |
walterluu | 3:85fc843a9d7d | 155 | |
walterluu | 3:85fc843a9d7d | 156 | #define LORA_SPI_MOSI P0_5 |
walterluu | 3:85fc843a9d7d | 157 | #define LORA_SPI_MISO P0_6 |
walterluu | 3:85fc843a9d7d | 158 | #define LORA_SPI_SCLK P0_4 |
walterluu | 3:85fc843a9d7d | 159 | #define LORA_CS P0_7 |
walterluu | 3:85fc843a9d7d | 160 | #define LORA_RESET P0_1 |
walterluu | 3:85fc843a9d7d | 161 | #define LORA_DIO0 P0_2 // DIO0=TxDone/RXDone/CADDone |
walterluu | 3:85fc843a9d7d | 162 | #define LORA_DIO1 NC // |
walterluu | 3:85fc843a9d7d | 163 | #define LORA_DIO2 NC // |
walterluu | 3:85fc843a9d7d | 164 | #define LORA_DIO3 NC // |
walterluu | 3:85fc843a9d7d | 165 | #define LORA_DIO4 NC // |
walterluu | 3:85fc843a9d7d | 166 | #define LORA_DIO5 NC // |
walterluu | 0:664d9df11a00 | 167 | |
walterluu | 0:664d9df11a00 | 168 | |
walterluu | 0:664d9df11a00 | 169 | #else |
walterluu | 0:664d9df11a00 | 170 | |
walterluu | 0:664d9df11a00 | 171 | #error "unknown board" |
walterluu | 0:664d9df11a00 | 172 | |
walterluu | 0:664d9df11a00 | 173 | #endif |