forked from atopile/esp32-s3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
esp32-s3.ato
75 lines (62 loc) · 1.8 KB
/
esp32-s3.ato
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import ESP32_S3_WROOM_1_N16R2_ from "elec/src/ESP32-S3-WROOM-1(N16R2).ato"
import Power from "generics/interfaces.ato"
import USB2 from "generics/interfaces.ato"
import SPI from "generics/interfaces.ato"
import I2C from "generics/interfaces.ato"
import UART from "generics/interfaces.ato"
import GPIO from "generics/interfaces.ato"
import JTAG from "generics/interfaces.ato"
import Resistor from "generics/resistors.ato"
import ButtonPullup from "generics/buttons.ato"
import ButtonSKRPACE010 from "generics/buttons.ato"
import Capacitor from "generics/capacitors.ato"
module ESP32S3:
"""
This is an esp32-s3 module.
"""
ic = new ESP32_S3_WROOM_1_N16R2_
power = new Power
# connect up power
power.vcc ~ ic._3V3
power.gnd ~ ic.GND
# decoupling caps
lil_cap = new Capacitor
big_cap_1 = new Capacitor
big_cap_2 = new Capacitor
lil_cap.power ~ power
big_cap_1.power ~ power
big_cap_2.power ~ power
lil_cap.value = 100nF +/- 20%
big_cap_1.value = 10uF +/- 20%
big_cap_2.value = 10uF +/- 20%
lil_cap.footprint = "C0402"
big_cap_1.footprint = "C0805"
big_cap_2.footprint = "C0805"
# reset button
enable_button = new ButtonPullup
enable_button.power ~ power
enable_button.out ~ ic.EN
enable_button.btn -> ButtonSKRPACE010
# connect up USB
usb = new USB2
usb.dm ~ ic.IO19
usb.dp ~ ic.IO20
# connect up JTAG
jtag = new JTAG
jtag.tck ~ ic.IO39
jtag.tms ~ ic.IO42
jtag.tdi ~ ic.IO41
jtag.tdo ~ ic.IO40
jtag.vcc ~ power.vcc
jtag.gnd ~ power.gnd
spi2 = new SPI
# FSPI default pinout
spi2.sck ~ ic.IO12
spi2.mosi ~ ic.IO11
spi2.miso ~ ic.IO13
spi2.cs ~ ic.IO10
# spi.gnd ~ power.gnd
# connect up I2C
i2c = new I2C
i2c.scl ~ ic.IO6
i2c.sda ~ ic.IO7