generated from atopile/project-template
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update radio to use ESP32 rather than STM32
- Loading branch information
Showing
4 changed files
with
57 additions
and
34 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 |
---|---|---|
@@ -1,35 +1,62 @@ | ||
import STM32L432KBU6 from "stm32l432kbu6/elec/src/stm32l432kbu6.ato" | ||
import SX1280 from "sx1280imltrt/elec/src/sx1280imltrt.ato" | ||
import JTAG_10PIN from "programming-headers/elec/src/programming-headers.ato" | ||
from "generics/interfaces.ato" import Power, UART, Pair | ||
from "generics/buttons.ato" import ButtonPullup, ButtonSKRPACE010 | ||
|
||
import Power from "generics/interfaces.ato" | ||
import UART from "generics/interfaces.ato" | ||
from "sx1280imltrt/elec/src/sx1280imltrt.ato" import SX1280 | ||
from "programming-headers/elec/src/programming-headers.ato" import JTAG_10PIN | ||
from "esp32-s3/esp32-s3.ato" import ESP32S3 | ||
from "sk6805-ec20/elec/src/sk6805-ec20.ato" import SK6805EC20 | ||
|
||
|
||
module Radio: | ||
""" | ||
ExpressLRS Radio Module based on the SX1280 and ESP32-S3 | ||
|
||
Required setup: | ||
- 3.3V power ~> power | ||
- A button in place of 'boot_button.btn' | ||
- UART for comms with handset | ||
|
||
Optional setup: | ||
- An RGB LED ~> led_do_if | ||
|
||
TODO: validate configuration in firmware | ||
https://github.com/mawildoer/ExpressLRS-targets/blob/mawildoer/swoop/TX/DIY%20S3_WROOM_1_N16R2%202400.json | ||
""" | ||
power = new Power | ||
uart = new UART | ||
micro = new STM32L432KBU6 | ||
radio = new SX1280 | ||
_micro = new ESP32S3 | ||
_radio = new SX1280 | ||
|
||
# optional JTAG header | ||
jtag_header = new JTAG_10PIN | ||
# Optional: Interface to connect an RGB LED to the radio | ||
led_do_if = new Pair | ||
led_do_if.gnd ~ power.gnd | ||
|
||
# external connections | ||
power ~ micro.power | ||
power ~ radio.power | ||
# Uart connections need to be crossed (need a better way to do this ) | ||
uart.tx ~ micro.uart.rx | ||
uart.rx ~ micro.uart.tx | ||
power ~ _micro.power | ||
power ~ _radio.power | ||
|
||
# ESP32 | ||
# UART connections need to be crossed (need a better way to do this) | ||
# This means people can connect straight to the UART as needed | ||
uart.tx ~ _micro.ic.RXD0 # GPIO43 | ||
uart.rx ~ _micro.ic.TXD0 # GPIO44 | ||
power.gnd ~ uart.gnd | ||
|
||
# internal connections | ||
radio.spi ~ micro.spi | ||
radio.data1 ~ micro.PA10 | ||
radio.data2 ~ micro.PA9 | ||
radio.data3 ~ micro.PA8 | ||
radio.busy ~ micro.PA11 | ||
radio.reset ~ micro.PB4 | ||
boot_button = new ButtonPullup | ||
boot_button.btn -> ButtonSKRPACE010 | ||
_micro.power ~ boot_button.power | ||
boot_button.output.vcc ~ _micro.ic.IO0 | ||
|
||
_radio.spi.miso ~ _micro.ic.IO15 | ||
_radio.spi.mosi ~ _micro.ic.IO16 | ||
_radio.spi.sck ~ _micro.ic.IO7 | ||
_radio.busy.io ~ _micro.ic.IO4 | ||
_radio.data1.io ~ _micro.ic.IO5 | ||
_radio.reset.io ~ _micro.ic.IO6 | ||
_radio.spi.cs ~ _micro.ic.IO17 | ||
|
||
# optional JTAG header | ||
jtag_header.jtag ~ micro.jtag | ||
_micro.ic.IO48 ~ led_do_if.io | ||
|
||
# JTAG header | ||
jtag_header = new JTAG_10PIN | ||
jtag_header.jtag ~ _micro.jtag |