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

Implement `async` support for all applicable peripheral drivers

Open jessebraham opened this issue 2 years ago • 15 comments

While we have a tracking issue for async drivers with embedded-hal-alpha traits (#70), we should additionally implement async drivers for peripherals which do not have traits pre-defined. We can still provide our own APIs and make these useful.

As we make progress on #70 and I have a better idea of how things are looking, I will update this comment to (eventually) include a task list tracking which drivers need work.


Note There may be additional peripherals missing from the list below which do support asynchronous operation, and conversely there may be peripherals listed below which do not support asynchronous operation. This will get cleaned up over time and this notice will be removed when able.

  • [ ] AES (in progress)
  • [ ] ECC
  • [x] GPIO
  • [x] I2C
  • [x] I2S
  • [ ] LEDC
  • [ ] MCPWM
  • [x] PARL_IO
  • [ ] PCNT
  • [x] RMT
  • [ ] RSA (in progress)
  • [ ] SDMMC
  • [ ] SHA
  • [x] SPI
  • [ ] TWAI
  • [x] UART
  • [x] USB (ESP32-S2 & ESP32-S3)
  • [x] USB_SERIAL_JTAG
  • [ ] ieee802154 radio

jessebraham avatar Jan 25 '23 18:01 jessebraham

I'll take a look at usb-serial-jtag as a start!

playfulFence avatar Jun 19 '23 13:06 playfulFence

I'll look into AES

JurajSadel avatar Jun 19 '23 14:06 JurajSadel

I'll be working on SHA!

SergioGasquez avatar Jun 22 '23 13:06 SergioGasquez

I plan a rewrite of the RMT driver including a reasonable level of async support. (Won't be able to start on this too soon - just mentioning it here)

bjoernQ avatar Jun 29 '23 06:06 bjoernQ

Async support for USB Serial JTAG added in #632

jessebraham avatar Jul 24 '23 14:07 jessebraham

Maybe it would be helpful to go through our existing drivers and figure out which are capable of asynchronous operation, then we can create a task list here to track the progress and hopefully make it easier for people to contribute.

jessebraham avatar Aug 22 '23 15:08 jessebraham

I'm working on RSA

playfulFence avatar Sep 05 '23 11:09 playfulFence

@JurajSadel @SergioGasquez any updates on your progress? If you don't have time to work on these it might be nice to push your current efforts to a branch so somebody else could wrap it up.

jessebraham avatar Sep 05 '23 12:09 jessebraham

I started working on SHA, abandoned it (it was not working) for other stuff, then DMA was refactored in several ways. Today, I started reimplementing my changes from scratch using an updated base branch, here are my changes: https://github.com/esp-rs/esp-hal/compare/main...SergioGasquez:esp-hal:feature/async-sha. It still not working, so I will try to work on it

SergioGasquez avatar Sep 05 '23 13:09 SergioGasquez

@jessebraham I have my work here: https://github.com/JurajSadel/esp-hal/tree/feature/async-aes it does something but it's not correct yet.

JurajSadel avatar Sep 07 '23 05:09 JurajSadel

I will start looking into async I2S next

bjoernQ avatar Sep 18 '23 15:09 bjoernQ

I'll implement async PARL_IO next

bjoernQ avatar Sep 21 '23 11:09 bjoernQ

Will take a look into USB for s2 and s3

playfulFence avatar Nov 16 '23 13:11 playfulFence

I'm working on TWAI in #951

ptpaterson avatar Nov 17 '23 02:11 ptpaterson

Just noting, the list in the original comment needs to be updated to include new peripherals on the ESP32-P4 (but this is pretty low-priority).

jessebraham avatar Feb 28 '24 17:02 jessebraham

I think this issue has probably outlived its usefulness, we can create issues per-driver as needed (some of these exist already).

jessebraham avatar Oct 03 '24 11:10 jessebraham