This commit is contained in:
Owen 2024-04-30 00:34:30 +00:00
parent 0c3ba1f9ec
commit 8c7f66238b
9 changed files with 93 additions and 35 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
dts/dtspp/*.dts*
device-tree/dtspp/*.dts*

View File

@ -29,49 +29,68 @@ looking down, Pin1 is top left, Pin40 bottom right
PB6 ------ o o ------ PB2
PD17 ------ o o ------ PB3
GND -- o o ------ PB4
```
Note that the spare onboard LED (activity?) is on `PD18`
Note that the spare onboard LED (activity?) is on `PD18` [pwm2]
## LoRA HAT pins
This is derived from the schematics; showing the 5 specific pins used (only)
## Default MQ-Pro mappings (as described in the schematic and other docs) looks like this:
```text
looking down, Pin1 is top left, Pin40 bottom right
3v3 -- o o -- 5v
o o -- 5v
o o -- GND
AUX ------ o o ------ TX (set to USB serial via jumpers on HAT)
GND -- o o ------ RX (set to USB serial via jumpers on HAT)
-- o o --
M1 ------ o o -- GND
M0 ------ o o --
3v3 -- o o --
-- o o -- GND
-- o o --
-- o o --
GND -- o o --
-- o o --
-- o o -- GND
-- o o --
-- o o -- GND
-- o o --
-- o o --
GND -- o o --
i2c0 SDA PG13 ------ o o -- 5v
i2c0 SDL PG12 ------ o o -- GND
PB7 ------ o o ------ PB8 uart0 TX
GND -- o o ------ PB9 uart0 RX
PD21 ------ o o ------ PB5 i2s CLK [pwm0]
PD22 ------ o o -- GND
[pwm3] PB0 ------ o o ------ PB1 [pwm4]
3v3 -- o o ------ PD14 spi1 HOLD
spi1 MOSI PD12 ------ o o -- GND
spi1 MISO PD13 ------ o o ------ PC1 uart2 RX
spi1 SCLK PD11 ------ o o ------ PD10 spi1 CS
GND -- o o ------ PD15 spi1 WS
i2c3 SDA PE17 ------ o o ------ PE16 i2c3 SCL
PB10 ------ o o -- GND
PB11 ------ o o ------ PC0 uart2 TX
PB12 ------ o o -- GND
[pwm1] i2s FS PB6 ------ o o ------ PB2
PD17 ------ o o ------ PB3 i2s DI0
GND -- o o ------ PB4 i2s DO
Note: I2C pins 2,5,27 and 28 (PG13, PG12, PE17 and PE16) have 10K pullup resistors to 3v3
```
The three fixed pins used by the HAT are 7,13 and 15.
These map as follows:
* `AUX` is on `PB7`
* `M1` is on `PD22`
* `M0` is on `PB0`
The Serial (TX,RX) is deselected via onboard jumpers, a secondary serial will be jumpered to the module TX/RX instead.
## Uart pins:
The D1 has 6 internal UARTs and many pin mappings are possible on the GPIO connector:
```text
3v3 -- o o -- 5v
UART1-RX PG13 ------ o o -- 5v
UART1-TX PG12 ------ o o -- GND
UART3-RX PB7 ------ o o ------ PB8 UART0-TX,UART1-TX
GND -- o o ------ PB9 UART0-RX,UART1-RX
UART1-TX PD21 ------ o o ------ PB5 UART5-RX
UART1-RX PD22 ------ o o -- GND
UART2-TX,UART0-TX PB0 ------ o o ------ PB1 UART0-RX,UART2-RX
3v3 -- o o ------ PD14 UART3-CTS
PD12 ------ o o -- GND
UART3-RTS PD13 ------ o o ------ PC1 UART2-RX
UART3-RX PD11 ------ o o ------ PD10 UART3-TX
GND -- o o ------ PD15
PE17 ------ o o ------ PE16
UART1-RTS PB10 ------ o o -- GND
UART1-CTS PB11 ------ o o ------ PC0 UART2-TX
PB12 ------ o o -- GND
UART5-TX PB6 ------ o o ------ PB2 UART4-TX
PD17 ------ o o ------ PB3 UART4-RX
GND -- o o ------ PB4 UART5-TX
```
Notes:
- UART0 on gpio pins 8 and 10 (PB8 and PB9) is the used for the system console by default
- UART1 is connected to the bluetooth device by default, this can be reconfigured onto the GPIO pins if bluetooth is not required.
- UART1 and UART3 have flow control lines available
## References
Pin mappings come from the Allwinner D1 datasheet, Table 4-3 (see the 'references' folder in this repo for a copy)
#### MQ Pro
https://mangopi.org/mangopi_mqpro
#### Lora HAT
https://www.waveshare.com/wiki/SX1262_868M_LoRa_HAT

View File

@ -0,0 +1,39 @@
# LoRA HAT pins
This is derived from the schematics; showing the 5 specific pins used (only)
```text
looking down, Pin1 is top left, Pin40 bottom right
3v3 -- o o -- 5v
o o -- 5v
o o -- GND
AUX ------ o o ------ TX (set to USB serial via jumpers on HAT)
GND -- o o ------ RX (set to USB serial via jumpers on HAT)
-- o o --
M1 ------ o o -- GND
M0 ------ o o --
3v3 -- o o --
-- o o -- GND
-- o o --
-- o o --
GND -- o o --
-- o o --
-- o o -- GND
-- o o --
-- o o -- GND
-- o o --
-- o o --
GND -- o o --
```
The three fixed pins used by the HAT are 7,13 and 15.
These map as follows:
* `AUX` is on `PB7`
* `M1` is on `PD22`
* `M0` is on `PB0`
The Serial (TX,RX) is deselected via onboard jumpers, a secondary serial will be jumpered to the module TX/RX instead.
## References
#### Lora HAT
https://www.waveshare.com/wiki/SX1262_868M_LoRa_HAT