esp-hal icon indicating copy to clipboard operation
esp-hal copied to clipboard

Track peripheral driver implementations for all chips

Open jessebraham opened this issue 2 years ago • 14 comments

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~~

jessebraham avatar Feb 23 '22 16:02 jessebraham

working on I2C

bjoernQ avatar Feb 25 '22 13:02 bjoernQ

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.

ducktec avatar Feb 26 '22 10:02 ducktec

I have an RNG implementation complete which I will PR soon, waiting on PACs to be updated.

Edit: added in #26

jessebraham avatar Mar 04 '22 17:03 jessebraham

I will start implementing embedded_hal::spi::FullDuplex

bjoernQ avatar Mar 07 '22 11:03 bjoernQ

@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 avatar Apr 23 '22 20:04 fkohlgrueber

@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. 😆

ducktec avatar Apr 25 '22 13:04 ducktec

I will start working on LEDC.

JurajSadel avatar Jun 01 '22 07:06 JurajSadel

I'll start working on DAC

bjoernQ avatar Jun 28 '22 10:06 bjoernQ

Going to look into ADC

bjoernQ avatar Jul 06 '22 07:07 bjoernQ

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.

gustavonihei avatar Aug 22 '22 12:08 gustavonihei

Working on the TWAI and the associated embedded_hal::can::Can traits.

alexbohm avatar Sep 07 '22 04:09 alexbohm

This is missing MCPWM? or is that PWM{0,1,2,3}?

liebman avatar Sep 23 '22 16:09 liebman

@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.

jessebraham avatar Sep 23 '22 23:09 jessebraham

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

bjoernQ avatar Oct 06 '22 11:10 bjoernQ

ADC is supported on all chips now that #217 is merged.

jessebraham avatar Oct 20 '22 16:10 jessebraham

Going to implement USB (device) for ESP32-S3 and S2 - starting with S3

bjoernQ avatar Oct 24 '22 09:10 bjoernQ

We now have some level of DMA support for all supported chips.

jessebraham avatar Oct 28 '22 14:10 jessebraham

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)

bjoernQ avatar Nov 03 '22 16:11 bjoernQ

Working on MCPWM

dimpolo avatar Nov 04 '22 20:11 dimpolo

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 avatar Nov 07 '22 23:11 dimpolo

Looking into implementing SHA

i404788 avatar Nov 08 '22 23:11 i404788

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!

jessebraham avatar Nov 09 '22 14:11 jessebraham

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).

raiker avatar Nov 12 '22 13:11 raiker

Preliminary I2S support added in #262

jessebraham avatar Nov 17 '22 16:11 jessebraham

SHA support added in #257

jessebraham avatar Nov 28 '22 22:11 jessebraham

MCPWM support added in #255

bjoernQ avatar Dec 01 '22 09:12 bjoernQ

I'm looking at PCNT.

liebman avatar Dec 31 '22 20:12 liebman

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. 😌

akashlama1998-icloud avatar Jan 06 '23 13:01 akashlama1998-icloud

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 :).

MabezDev avatar Jan 06 '23 13:01 MabezDev

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.

akashlama1998-icloud avatar Jan 08 '23 10:01 akashlama1998-icloud