-
Notifications
You must be signed in to change notification settings - Fork 91
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
Add support for single Core ESP32 / multiple TWAI controllers #65
base: master
Are you sure you want to change the base?
Conversation
Any timeline on merging this @collin80? |
My only real trepidation about merging this is that it defaults to not loading the driver for external controllers. Since that was the old default this would break all existing programs that relied on the fact that an external controller was automatically loaded. I do realize that perhaps I should never have made that the default but that's what happened. So, I have to decide what I want to do about that. I should have done that back when this pull request was created but I've been busy. I will try to merge this in soon. |
@collin80 one option for not introducing a breaking change is that I can have it default to defining Any thoughts? |
Hi @outlandnish, espressif/arduino-esp32 updated the core IDF to 5.3 in 3.1.0 RC today.
Could you recommend fixes to them? |
Changes
xTaskCreate
instead ofxTaskCreatePinnedToCore
if used on a device withCONFIG_FREERTOS_UNICORE
enabled (e.g. on single core ESP32s)SOC_TWAI_CONTROLLER_NUM = 2
(like on the ESP32 C6 with two CAN controllers) and IDF version >= 5.2 (which introduces the v2 TWAI API)HAS_EXTERNAL_CAN_CONTROLLER
that a user can set before includingesp32_can.h
to enable support for an MCP2515 / MCP2517FD controller. IfSOC_TWAI_CONTROLLER_NUM = 2
and IDF version >= 5.2, the MCP device shows up asCAN2
(andCAN1
otherwise)Example for external controller