esp-rs / esp-hal

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

Add HIL tests for all peripherals which are practical to test #1334

Open jessebraham opened 3 months ago

jessebraham commented 3 months ago

For now, let's use the table from https://github.com/esp-rs/esp-hal/issues/809#issuecomment-1999308797:

I've gathered a list of the esp-hal modules and how hard/easy I think it would be to test those (take it with a grain of salt as I may have misevaluated some). Also, some modules can't be tested, or it does not make sense:

MabezDev commented 3 months ago

One reference for the peripherals is the list @SergioGasquez created here: https://github.com/esp-rs/esp-hal/issues/809#issuecomment-1999308797

SergioGasquez commented 3 months ago

I will be working on RSA

SergioGasquez commented 3 months ago

I will be working on CRC

JurajSadel commented 3 months ago

Working on usb-serial-jtag

SergioGasquez commented 2 months ago

Working on SHA

SergioGasquez commented 2 months ago

Working on clock monitoring

JurajSadel commented 2 months ago

I'm currently stuck with usb-serial-jtag, I will work on debug-assist next.

SergioGasquez commented 2 months ago

I will also try to add aes_dma and improve the current aes test to cover all the modes.

Dominaezzz commented 1 week ago

I want to write a HIL test for the LCD_CAM but there's not enough loopback pin connections. At the moment there's only two, any chance I could get two more (at least on the S3)? The alternative is going through the GPIO matrix (which would be ideal I suppose, less faff to run the tests) but that'll need #1662 .

SergioGasquez commented 1 week ago

At the moment there's only two, any chance I could get two more (at least on the S3)?

How many connected pins would you need? Feel free to suggest any pins that you would like to get connected, see https://github.com/esp-rs/esp-hal/issues/1332#issuecomment-2059093479 which might be helpful.

Dominaezzz commented 1 week ago

4 total pairs. A clock pin, a data pin, and two ctrl pins.

According to https://github.com/esp-rs/esp-hal/tree/main/hil-test:

I suppose a strategic choice for two more pairs would be:

My strategy there was to connect a pin with a specific function to another pin with no functions. This is an S3 only choice, as the LCD_CAM only exists there.

SergioGasquez commented 1 week ago

Awesome, I'll try to get those pins connected in the upcoming days. On the ESP32-S3, the following would be added:

SergioGasquez commented 1 week ago

@Dominaezzz, our S3 self-hosted runner already has the connections we discussed.