Open Jascha-N opened 3 days ago
Sorry I wasn't able to reproduce your issue, S3 is receiving frames just fine for me. On the other hand I found a few unrelated issues on other chips (fixed in https://github.com/esp-rs/esp-hal/pull/2288). Can you please provide more information about your setup?
Bug description
The TWAI peripheral seems to not be initialized properly on ESP32-S3 (and possibly others). Transmitting seems to work but receiving frames does not (it blocks forever). However when I first flash the device with a ESP-IDF C binary that initializes the TWAI peripheral and then flash it again with the esp-hal Rust binary then receiving magically starts to work. Power cycling the device breaks it again (software resets do not). This happens for both blocking and async TWAI drivers on version 0.20.1 and the main branch.
To Reproduce
On an ESP32-S3 (maybe also on other devices) connected over CAN to another device that periodically sends frames:
Twai::receive
/Twai::receive_async
never returnsExpected behavior
I expect the frames to be received.
Environment