Skip to content
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

assert failed: twai_handle_tx_buffer_frame twai.c:183 (p_twai_obj->tx_msg_count >= 0) if CONFIG_TWAI_ERRATA_FIX_TX_INTR_LOST=y (IDFGH-8204) #932

Closed
EmbeddedDevver opened this issue Oct 4, 2022 · 6 comments

Comments

@EmbeddedDevver
Copy link

EmbeddedDevver commented Oct 4, 2022

The TWAI interface has a bug that causes the chip to reboot if you short / have interference the CANBUS pins. There is a proposed solution in the IDF github.

For that I need to adjust the IDF TWAI component:

# TWAI configuration
#
CONFIG_TWAI_ERRATA_FIX_TX_INTR_LOST=y

Does anyone know how I could implement it in the Arduino/Platformio enviroment?

@Jason2866
Copy link
Contributor

No you have to configure

# CONFIG_TWAI_ERRATA_FIX_TX_INTR_LOST is not set

to avoid crashing until the bug is fixed in IDF. In the meantime

@EmbeddedDevver
Copy link
Author

EmbeddedDevver commented Oct 4, 2022

Thanks Jason for your reply.

How can I compile the TWAI for platformIO myself, I want to fix it for (platform = espressif32 @ ^4.4.0) ? Do you know where I can start with that?
Thank you!

I use platformIO

No bug is with version 3.5

platform = espressif32 @ ^3.5.0

Then there is no problem.

starting version 4.x then the bug starts eg

platform = espressif32 @ ^4.4.0

@Jason2866
Copy link
Contributor

Than it is not the setting mentioned. This was changed lately. https://espressif-docs.readthedocs-hosted.com/projects/arduino-esp32/en/latest/esp-idf_component.html

@EmbeddedDevver
Copy link
Author

Please note
espressif32 3v5 does not use TWAI but CAN.
espressif32 4.4 uses TWAI (with the bug)

@Jason2866
Copy link
Contributor

Jason2866 commented Oct 4, 2022

Not a platformio issue anyways. You can start here https://community.platformio.org/t/framework-espidf-arduino/14949
There is already a open issue in IDF, search the error or wait until it is fixed or use the old working core.

@f-hoepfinger-hr-agrartechnik

espressif/esp-idf#9697

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants