-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESP32-C3: TWAI broken when using GPIO1 for RX #1207
Comments
After a lot of fiddling, it seems that for whatever reason things don't work for me when using GPIO 1 as RX. |
Please don't use GPIO 1 for RX, due to issue here: esp-rs/esp-hal#1207
I have been playing with Rust on the ESP32-C3 and I ran into the same problem where GPIO1 does not work as RX for the TWAI peripheral. I already had some code written in C using the ESP-IDF which did work on my hardware, so I knew this was a software issue. To determine where the issue is, I started comparing the registers of the peripherals after they were initialized by C and by Rust. I noticed that the // Disable CLKOUT
T::register_block()
.clock_divider()
.write(|w| w.clock_off().bit(true)); I will try to open a pull request tomorrow to incorporate this change and fix the issue. |
Okay I have checked again, and it seems like #1906 did fix the problem. I was tripped up by #1929, because before it was merged the peripheral was always initialized in listen only mode, while I was trying to transmit first before receiving. When I forked the repo to implement my fix it suddenly started working because I was using a newer version of |
While testing #1196 it was found that TWAI is apparently broken for ESP32-C3 while it's still working for ESP32-S3
The text was updated successfully, but these errors were encountered: