esp-hal
esp-hal copied to clipboard
Track peripheral driver implementations for all chips
The table below enumerates all peripherals for each chip supported by esp-hal
. Support in this case does not mean a feature-complete and bug-free driver implementation, only that you are able to interact with the peripheral in some meaningful way.
If a cell contains am em dash (—) this means that the particular peripheral is not present for a chip. A check mark (✓) means that some driver implementation exists.
The table should be complete, though some minor naming changes have been made for consistency. If there are any missing peripherals or errors please comment below indicating such.
If you would like to contribute to this project, we ask that you please comment below "claiming" a peripheral, just to help ensure people are not stepping on each others' feet.
Peripheral | ESP32 | ESP32-C3 | ESP32-S2 | ESP32-S3 |
---|---|---|---|---|
~~GPIO~~ | ✓ | ✓ | ✓ | ✓ |
~~LEDC~~ | ✓ | ✓ | ✓ | ✓ |
~~UART0~~ | ✓ | ✓ | ✓ | ✓ |
~~UART1~~ | ✓ | ✓ | ✓ | ✓ |
~~UART2~~ | ✓ | — | — | ✓ |
USB | — | |||
~~I2C0~~ | ✓ | ✓ | ✓ | ✓ |
~~I2C1~~ | ✓ | — | ✓ | ✓ |
I2S0 | — | |||
I2S1 | — | |||
LCD_CAM | — | — | — | |
~~TIMG0~~ | ✓ | ✓ | ✓ | ✓ |
~~TIMG1~~ | ✓ | ✓ | ✓ | ✓ |
MCPWM | — | — | ||
UHCI0 | ||||
UHCI1 | — | |||
~~RMT~~ | ✓ | ✓ | ✓ | ✓ |
PCNT | — | |||
~~SPI2~~ | ✓ | ✓ | ✓ | ✓ |
~~SPI3~~ | ✓ | ✓ | ✓ | ✓ |
SDMMC | — | — | ||
SDIO_SLAVE | — | — | — | |
TWAI | ||||
~~RNG~~ | ✓ | ✓ | ✓ | ✓ |
EMAC | — | — | — | |
WIFI | ||||
BT | — | |||
WIFI_BT | ||||
BT_BB | — | |||
BT_LC | — | |||
AES | ||||
RSA | ||||
SHA | ||||
HMAC | — | — | ||
DS | — | — | ||
~~SYSTIMER~~ | — | ✓ | ✓ | ✓ |
DMA | ||||
DEDIC_GPIO | — | — | ||
SARADC | ✓ | ✓ | ✓ | |
~~DAC~~ | ✓ | — | ✓ | — |
~~USB_SERIAL_JTAG~~ | — | ✓ | — | ✓ |
working on I2C
I'm working on supporting the RMT
peripheral. This should add support for driving many RGB LEDs and I have some implementation already from my work on esp32c3-hal
to build upon.
I have an RNG
implementation complete which I will PR soon, waiting on PACs to be updated.
Edit: added in #26
I will start implementing embedded_hal::spi::FullDuplex
@ducktec I just saw that you're working on supporting the rmt
peripheral too right after I opened https://github.com/esp-rs/esp-hal/issues/52. Are you still working on the topic? If yes, we could probably join forces.
@fkohlgrueber I'm already pretty far with the implementation of the OutputChannel
functionality (I'm not planning to support the input functionality as part of my PR so far).
For better visibility I have just created #53. The PR so for includes the ESP32-C3
and ESP32-S2
variants. The ESP32
and ESP32-S3
variants are still WIP. The ESP32-S3
variant is missing the RMT peripheral in the SVD altogether right now.
The challenge is that all variants have a sightly different RMT feature set and register structure. This makes bringing them all together into generic implementation a lot of fun. 😆
I will start working on LEDC.
I'll start working on DAC
Going to look into ADC
RTC Watchdog Timer has been implemented and validated on https://github.com/esp-rs/esp-hal/pull/134 and https://github.com/esp-rs/esp-hal/pull/139 for all currently supported chips.
The RTC driver itself has been improved as part of those tasks, but some pieces are not yet implemented, e.g. configuration for sleep modes.
Working on the TWAI and the associated embedded_hal::can::Can
traits.
This is missing MCPWM? or is that PWM{0,1,2,3}?
@liebman I think that's what those were supposed to be, I honestly don't even remember where I generated this list from at this point 😁 Thanks for pointing that out. I've updated the table to use MCPWM
instead though, as based on the cells which were blocked out it seems to fit.
I will start looking into GDMA on ESP32-C3. Maybe I can extend it to support for ESP-S3 later but DMA on ESP32 and ESP32-S2 is fundamentally different - so this would be a very first step
ADC
is supported on all chips now that #217 is merged.
Going to implement USB (device) for ESP32-S3 and S2 - starting with S3
We now have some level of DMA
support for all supported chips.
Going to implement first steps to get I2S support (starting with ESP32-C3 / ESP32-S3 - then ESP32 and ESP32-S2, just TX for the start and only supporting standard I2S - we can improve that later but we need something to start with)
Working on MCPWM
Do I understand correctly that the ESP32-C2 is secretly an ESP8684? (what's up with espressif's chip names? 😅 )
If so, the first table seems to be missing some —
for the ESP32-C2.
Looking into implementing SHA
Do I understand correctly that the ESP32-C2 is secretly an ESP8684? (what's up with espressif's chip names? 😅 )
If so, the first table seems to be missing some
—
for the ESP32-C2.
@dimpolo My understanding regarding the device names is that the ESP8684/ESP8685 are variants of the ESP32-C2/C3 respectively with flash memory integrated into the package. I'm not aware of any other differences, though that's not to say they don't exist.
You are correct though, seems I updated one table's column but not the others' when I added the C2. I will get that fixed shortly!
I'd like to tackle USB serial on the ESP32-C3. I'm going to start by fleshing out the USB_SERIAL_JTAG so it looks and feels a bit more like a UART (Rx, interrupts, etc).
Preliminary I2S
support added in #262
SHA
support added in #257
MCPWM
support added in #255
I'm looking at PCNT.
No AES, RSA and I guess secure boot as well that means it's not production ready yet 😔. It's really early I guess. Just suited for DIY right now rather than shipping to production. I'm eagerly for the project to be stable and when I search for esp rs or esp for rust the official document comes up rather than something else. 😌
I'm eagerly for the project to be stable and when I search for esp rs or esp for rust the official document comes up rather than something else
We don't have control over SEO ranking, so it's unlikely this will change any time soon.
If you want production-ready you can use the standard library approach. Other than that bare metal PRs are welcome :).
Lack of documentation I get it. But SECURE BOOT for esp32 in rust how can this be off topic. It's an essential part if that doesn't exist or hasn't been a plan to support then you can only use rust on esp32 for home DIYs NOT production.