Espressif · ESP32-DevKitC-32E
ESP32-DevKitC
Espressif ESP32-DevKitC V4: an ESP32-WROOM-32E module (two Xtensa LX6 cores, Wi-Fi, Bluetooth) with a USB-UART bridge.
In short
ESP32 development board: two 240 MHz Xtensa LX6 cores, 520 KB SRAM, Wi-Fi and Bluetooth. The TWAI (CAN) controller can be routed to most GPIOs and needs an external transceiver.
Specs
From the board’s model in the store.
- Processor
- ESP32 · 2× Xtensa LX6 · chip "esp32"
- Clock
- 240 MHz
- Flash
- 4 MB
- RAM
- 520 KB
- GPIO pins
- 26
- ADC
- ADC1 6 ch 12-bit, ADC2 10 ch 12-bit
- Logic level
- 3.3 V
- Power
- 5 V USB (in); 3V3 pin: 3.3 V; 5V pin (from USB): 5 V
- Current per pin
- not in the board’s model yet
- Buses
- UART ×3, I²C ×2, SPI ×2, CAN ×1
- On any pin
- UART, I²C, SPI, CAN, PWM
- Runs
- bare metal (no OS)
Pin map
Each pin by what it does. Hover or tap a pin to see what else it can be.
- Power 3
- Digital 5
- Analog 12
- Bus 4
- Control 5
- GPIO0GPIO0
- GPIO1GPIO1
- GPIO2GPIO2
- GPIO3GPIO3
- GPIO4GPIO4
- GPIO5GPIO5
- GPIO12GPIO12
- GPIO13GPIO13
- GPIO14GPIO14
- GPIO15GPIO15
- GPIO16GPIO16
- GPIO17GPIO17
- GPIO18GPIO18
- GPIO19GPIO19
- GPIO21GPIO21
- GPIO22GPIO22
- GPIO23GPIO23
- GPIO25GPIO25
- GPIO26GPIO26
- GPIO27GPIO27
- GPIO32GPIO32
- GPIO33GPIO33
- GPIO34GPIO34
- GPIO35GPIO35
- GPIO36GPIO36
- GPIO39GPIO39
- pwr5 V USB
- v3v33V3 pin
- v55V pin (from USB)
Watch out
What archec checks for this board, from its data. Each one names the check that catches it.
Its pins work at 3.3 V. A 5 V sensor’s output on one of them needs a level shifter between them.
check
pin-levelTwo of the board’s connectors share these pins: GPIO21 (TWAI (add a transceiver) / I2C0), GPIO22 (TWAI (add a transceiver) / I2C0). Use one or the other.
check
pin-conflictThe board already uses GPIO0 (BOOT Button (low when pressed)). Something else wired there fights with it.
check
pin-conflictIt gives 3.3 V (3V3 pin), 5 V (5V pin (from USB)). Power each part from a rail at its own voltage.
check
board-supplyIt has 3 UART, 2 I²C, 2 SPI, 1 CAN. One more bus of a kind than that is an error.
check
board-peripheral
First model
A blink for this board: the board, an LED and a part that turns it over every 500 ms. archec checks it, then writes the code on the right.
project Blink "Blink" {
version "0.1.0"
edition "1.0"
uses arche-hw-store "^0.1"
}
include "arche-hw-store/boards/esp32-devkitc/esp32-devkitc.arche"
include "arche-hw-store/devices/led/led.arche"
/// Turns the LED over at each step.
component Blinker "Blinker" {
out led: requires Led
fn blink "Blink" {
```arche
led.toggle()
```
wcet 50us
}
}
/// The board, an LED on pin GPIO16, and the blinker.
system Hw "Blink" {
part board: Esp32DevKitC
part led: GpioLed { in pin { pins { pin GPIO16 } } }
part blinker: Blinker
blinker.led -> led.led
}
/// The firmware: the blinker every 500 ms.
deployment OnBoard "On the board" {
system Hw
platform Hw
binary blink on board {
thread main "Blink" { runs blinker; period 500ms; step blink }
}
}
//! Your code: the state and behaviour of this part. Write it between the USER CODE markers:
//! when the model changes, `archec gen` writes this file again around them (a new function, a
//! new input) and keeps them. Edit outside them and the file is yours: it is left as it is,
//! and the compiler says what to add (a new trait method).
#[allow(unused_imports)]
use crate::arche::*;
// @arche blinker main.arche:25 part
/// blinker
#[derive(Default)]
pub struct Blinker {}
impl BlinkerBehaviour for Blinker {
// @arche blinker.blink main.arche:13 fn
async fn blink(&mut self, _out: &BlinkerOut) {
// Blink: from the model (```arche)
_out.call_led_toggle().await;
}
}blink/src/app/blinker.rs, one of the 14 files archec writes.
Parts on the board
What each numbered part is. Click a number to find it on the board.
Find the part
The quiz names a part: click it on the board. A first try scores a point.