espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.56k stars 7.27k forks source link

TWAI how to disable errata fix, bad performance in new IDE builds (IDFGH-9314) #10694

Open zachtos opened 1 year ago

zachtos commented 1 year ago

Answers checklist.

General issue report

I want to turn these options off. It sounds like I can not turn them off in platform.io by simply changing the values in the sdkconfig.h

Can I just add these before setup?

define CONFIG_TWAI_ERRATA_FIX_BUS_OFF_REC 0

define CONFIG_TWAI_ERRATA_FIX_TX_INTR_LOST 0

define CONFIG_TWAI_ERRATA_FIX_RX_FRAME_INVALID 0

define CONFIG_TWAI_ERRATA_FIX_RX_FIFO_CORRUPT 0

I have a project that uses TWAI, it was working great with 100 nodes at 500kbit/sec, compiled in v3.5 IDE , now on v5 or v6 IDE, the network is much slower. Nothing in code has changed. I think it may be these changes...

igrr commented 1 year ago

@zachtos It depends on whether you are using the esp-idf framework or arduino framework in PlatformIO. If it is the former, please refer to PlatformIO docs on how to change the configuration values: https://docs.platformio.org/en/latest/frameworks/espidf.html#configuration. If it is the latter, then changing sdkconfig settings is not possible.