esp-rs / esp-hal

no_std Hardware Abstraction Layers for ESP32 microcontrollers
https://docs.esp-rs.org/esp-hal/
Apache License 2.0
734 stars 204 forks source link

Add support for the ESP32-H2 #224

Closed jessebraham closed 1 year ago

jessebraham commented 2 years ago

I'll be taking care of this one as well (possibly in collaboration with some colleague(s)), and this likely won't happen until the new year, but just wanted to create a tracking issue regardless.

Status

jessebraham commented 1 year ago

I've begun work on HAL support for this device.

jessebraham commented 1 year ago

Development will take place in this branch until the changes are ready to merge into main:
https://github.com/esp-rs/esp-hal/tree/feature/esp32h2

jessebraham commented 1 year ago

Merged #482 today which begins adding support for the H2. A few more PRs will likely be merged to this branch before merging into main.

I will periodically rebase the feature/esp32h2 branch on main until we're ready to merge.

jessebraham commented 1 year ago

Initial support for this device has been merged into main. We will continue to add support for additional peripherals in the coming weeks.

We can track the status roughly by tracking which examples are working:

In addition to the above examples, we must also address the direct-boot feature:

Once all the above items have been completed, we need to do a final pass of review, cleanup, documentation, etc.

jessebraham commented 1 year ago

I will start working on the six SPI-related examples: embassy_spi, spi_eh1_device_loopback, spi_eh1_loopback, spi_halfduplex_read_manufacturer_id, spi_loopback, and spi_loopback_dma.

SergioGasquez commented 1 year ago

I'm working on RSA and SHA

Also, I've tried to add support for RNG but the bootloader that we currently use does not have bootloader_random_enable/bootloader_random_disable implemented yet, hence RNG can't work. We'll need to check if there is a more recent bootloader or wait until those methods are implemented.

SergioGasquez commented 1 year ago

Also, I've tried to add support for RNG but the bootloader that we currently use does not have bootloader_random_enable/bootloader_random_disable implemented yet, hence RNG can't work. We'll need to check if there is a more recent bootloader or wait until those methods are implemented.

Just tried with the latest esp-idf bootloader, and it still does not implement those methods, here is how I tried it:

  1. Downloaded esp-idf master
  2. Installed it for esp32h2
  3. Built, flash and monitored (idf.py flash monitor) one of the examples (get-started/blink)

Results in:

I (23) boot: ESP-IDF v5.2-dev-503-g17451f1fb3 2nd stage bootloader
...
W (48) bootloader_random: bootloader_random_enable() has not been implemented yet
...
I (155) boot: Disabling RNG early entropy source...
W (160) bootloader_random: bootloader_random_disable() has not been implemented yet

Update: did some more research on this end and ESP-IDF has also this issue tracked under https://github.com/espressif/esp-idf/issues/11038, once that IDF-6274 is fixed, we may add it.

jessebraham commented 1 year ago

Added a few more examples in #548 (advanced_serial, embassy_hello_world, systimer, usb_serial_jtag).

The SPI examples are "done" but there are some issues to be debugged, so still in-progress.

EDIT: figured out the issues, see #549 for SPI examples.

SergioGasquez commented 1 year ago

Working on PCNT!

jessebraham commented 1 year ago

Working on all the interrupt-related examples (ie. those with interrupt in their names)

(See #557)

SergioGasquez commented 1 year ago

Working on RMT!

playfulFence commented 1 year ago

I'll take i2s! (both read and sound)

JurajSadel commented 1 year ago

I will look into LEDC

SergioGasquez commented 1 year ago

Im working in debug_assist

JurajSadel commented 1 year ago

I'm working on ADC 😅

JurajSadel commented 1 year ago

Looking into timer_interrupt example

JurajSadel commented 1 year ago

I'll look into i2s

jessebraham commented 1 year ago

With #597 merged we have completed all examples for this device!

We should done one final round of review (clean up any warnings, etc.) and verify that all examples are still working (this is in-progress) and then I think we're good for our first release!

Thanks to everybody who contributed to supporting this device!

jessebraham commented 1 year ago

esp32h2-hal@0.1.0 has been published!