Repository navigation
Rak3112 support #8591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Rak3112 support #8591
Changes from 6 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
e5504ab
Add rak3112 to board variants
ford-jones 4ccc901
Add rak3112 to architecture definitions
ford-jones d54b2b9
Disable SDcard support
ford-jones 6e43ab0
Update comments
ford-jones f88a68b
Remove duplicate definitions and use expected SPI naming for SDcard m…
ford-jones ad663e4
SDcard module serial interface chip set definition
ford-jones 8813804
Refactor modular variant into existing environment
ford-jones 78b38da
Merge branch 'develop' into rak3112-support
ford-jones 7f02dbe
Make requested changes
ford-jones 2d90f9e
Merge branch 'rak3112-support' of https://github.com/ford-jones/firmw…
ford-jones 5e42b30
Extend 3312 variants
ford-jones 40f7c71
Remove duplicate architecture definition
ford-jones 775047d
Merge branch 'develop' into rak3112-support
ford-jones 24781a4
Merge branch 'develop' into rak3112-support
ford-jones 45ad777
Fix definition naming
ford-jones 5401625
Merge branch 'develop' into rak3112-support
ford-jones fd8e207
Merge branch 'develop' into rak3112-support
ford-jones 9a94374
Merge branch 'develop' into rak3112-support
ford-jones 951660a
Merge branch 'develop' into rak3112-support
ford-jones 7e325ff
Merge branch 'develop' into rak3112-support
ford-jones aa854ad
Merge branch 'develop' into rak3112-support
ford-jones File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| { | ||
| "build": { | ||
| "arduino": { | ||
| "ldscript": "esp32s3_out.ld", | ||
| "memory_type": "qio_opi" | ||
| }, | ||
| "core": "esp32", | ||
| "extra_flags": [ | ||
| "-DRAK3112", | ||
| "-DARDUINO_USB_CDC_ON_BOOT=1", | ||
| "-DARDUINO_USB_MODE=1", | ||
| "-DARDUINO_RUNNING_CORE=1", | ||
| "-DARDUINO_EVENT_RUNNING_CORE=1", | ||
| "-DBOARD_HAS_PSRAM" | ||
| ], | ||
| "f_cpu": "240000000L", | ||
| "f_flash": "80000000L", | ||
| "flash_mode": "qio", | ||
| "hwids": [["0x303A", "0x1001"]], | ||
| "mcu": "esp32s3", | ||
| "variant": "rak3112" | ||
| }, | ||
| "connectivity": ["wifi", "bluetooth"], | ||
| "debug": { | ||
| "openocd_target": "esp32s3.cfg" | ||
| }, | ||
| "frameworks": ["arduino", "espidf"], | ||
| "name": "RAKwireless RAK3112", | ||
| "upload": { | ||
| "flash_size": "16MB", | ||
| "maximum_ram_size": 327680, | ||
| "maximum_size": 16777216, | ||
| "use_1200bps_touch": true, | ||
| "wait_for_upload_port": true, | ||
| "require_upload_port": true, | ||
| "speed": 921600 | ||
| }, | ||
| "url": "http://www.rakwireless.com/", | ||
| "vendor": "RAKwireless" | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| #ifndef Pins_Arduino_h | ||
| #define Pins_Arduino_h | ||
|
|
||
| #include <stdint.h> | ||
|
|
||
| #ifndef _VARIANT_RAK3112_ | ||
| #define _VARIANT_RAK3112_ | ||
| #endif | ||
|
|
||
| #define USB_VID 0x303a | ||
| #define USB_PID 0x1001 | ||
|
|
||
| // GPIO's | ||
| #define WB_IO1 21 | ||
| #define WB_IO2 2 | ||
| // #define WB_IO2 14 | ||
| #define WB_IO3 41 | ||
| #define WB_IO4 42 | ||
| #define WB_IO5 38 | ||
| #define WB_IO6 39 | ||
| // #define WB_SW1 35 NC | ||
| #define WB_A0 1 | ||
| #define WB_A1 2 | ||
| #define WB_CS 12 | ||
| #define WB_LED1 46 | ||
| #define WB_LED2 45 | ||
|
|
||
| // LEDs | ||
| #define PIN_LED1 (46) | ||
| #define PIN_LED2 (45) | ||
| #define LED_BLUE PIN_LED2 | ||
| #define LED_GREEN PIN_LED1 | ||
| #define LED_BUILTIN LED_GREEN | ||
| #define LED_CONN PIN_LED2 | ||
| #define LED_STATE_ON 1 // State when LED is litted | ||
|
|
||
| /* | ||
| * Analog pins | ||
| */ | ||
| #define PIN_A0 (21) | ||
| #define PIN_A1 (14) | ||
|
|
||
| /* | ||
| * Serial interfaces | ||
| */ | ||
| // TXD1 RXD1 on Base Board | ||
| #define PIN_SERIAL1_RX (44) | ||
| #define PIN_SERIAL1_TX (43) | ||
|
|
||
| // TXD0 RXD0 on Base Board (NC due to large flash chip) | ||
| // #define PIN_SERIAL2_RX (19) | ||
| // #define PIN_SERIAL2_TX (20) | ||
|
|
||
| /* | ||
| * SPI Interfaces | ||
| */ | ||
| #define SPI_INTERFACES_COUNT 1 | ||
|
|
||
| #define SPI_MISO (10) | ||
| #define SPI_MOSI (11) | ||
| #define SPI_SCK (13) | ||
| #define SPI_CS (12) | ||
|
|
||
| static const uint8_t SS = SPI_CS; | ||
| static const uint8_t MOSI = SPI_MOSI; | ||
| static const uint8_t MISO = SPI_MISO; | ||
| static const uint8_t SCK = SPI_SCK; | ||
|
|
||
| // Internal SPI to LoRa transceiver | ||
| #define LORA_SX126X_SCK 5 | ||
| #define LORA_SX126X_MISO 3 | ||
| #define LORA_SX126X_MOSI 6 | ||
|
|
||
| /* | ||
| * Wire Interfaces | ||
| */ | ||
| #define WIRE_INTERFACES_COUNT 2 | ||
|
|
||
| #define PIN_WIRE_SDA (9) | ||
| #define PIN_WIRE_SCL (40) | ||
| #define SDA PIN_WIRE_SDA | ||
| #define SCL PIN_WIRE_SCL | ||
|
|
||
| #define PIN_WIRE1_SDA (17) | ||
| #define PIN_WIRE1_SCL (18) | ||
|
|
||
| #endif /* Pins_Arduino_h */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| [env:rak3112] | ||
| extends = esp32s3_base | ||
| board = wiscore_rak3112 | ||
| upload_protocol = esptool | ||
| upload_speed = 921600 | ||
| monitor_speed = 115200 | ||
| board_build.filesystem = littlefs | ||
|
|
||
| build_flags = | ||
| ${esp32_base.build_flags} | ||
| -D RAK3112 | ||
| -I variants/esp32s3/rak3112 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| #ifndef _VARIANT_RAK3112_ | ||
| #define _VARIANT_RAK3112_ | ||
| #endif | ||
|
|
||
| #define USE_SSD1306 | ||
|
|
||
| #define BATTERY_PIN WB_A0 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage | ||
| // ratio of voltage divider = 2.0 (R42=100k, R43=100k) | ||
| #define ADC_MULTIPLIER 2.11 // 2.0 + 10% for correction of display undervoltage. | ||
| #define ADC_CHANNEL ADC1_GPIO1_CHANNEL | ||
|
|
||
| #define I2C_SDA PIN_WIRE_SDA // I2C pins for this board | ||
| #define I2C_SCL PIN_WIRE_SCL | ||
|
|
||
| #define I2C_SDA1 PIN_WIRE1_SDA | ||
| #define I2C_SCL1 PIN_WIRE1_SCL | ||
|
|
||
| #define LED_PIN LED_GREEN // If defined we will blink this LED | ||
| #define BUTTON_PIN WB_IO5 // If defined, this will be used for user button presses, | ||
| #define ledOff(pin) pinMode(pin, INPUT) | ||
|
|
||
| #define BUTTON_NEED_PULLUP | ||
|
|
||
| #define USE_SX1262 | ||
|
|
||
| #define LORA_SCK 5 | ||
| #define LORA_MISO 3 | ||
| #define LORA_MOSI 6 | ||
| #define LORA_CS 7 | ||
| #define LORA_RESET 8 | ||
|
|
||
| // per SX1262_Receive_Interrupt/utilities.h | ||
| #ifdef USE_SX1262 | ||
| #define SX126X_CS LORA_CS | ||
| #define SX126X_DIO1 47 | ||
| #define SX126X_BUSY 48 | ||
| #define SX126X_RESET LORA_RESET | ||
| #define SX126X_DIO2_AS_RF_SWITCH | ||
| #define SX126X_DIO3_TCXO_VOLTAGE 1.8 | ||
| #endif | ||
|
|
||
| // Have SPI interface SD card slot | ||
| #define HAS_SDCARD | ||
| #define SDCARD_USE_SPI1 | ||
| #define SDCARD_CS SPI_CS |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.