Location of CAN driver / example

4okoboko
Posts: 7
Joined: Wed Nov 16, 2022 7:54 am

Location of CAN driver / example

Postby 4okoboko » Fri Feb 10, 2023 1:35 pm

Hello,

I am currently trying to include CAN functionality to my project.

I read about the CAN peripheral under the following link:

https://docs.espressif.com/projects/esp ... s/can.html

After reading through the documentation, I wanted to try out the examples, which according to the doc should be located under .../peripherals/can/...

But unfortunately I cannot find a 'can' folder under .../esp-idf/examples/peripherals inside my esp-idf installation.

I also cannot find the can.h header under ...esp-idf/components/driver/include/driver

My esp-idf version is I assume quite recent: 'idf.py --version' returns in terminal 'ESP-IDF v5.1-dev-1626-g4b6d9c8ad3'

I also checked the github repo for the esp-idf folder hierarchy under:

https://github.com/espressif/esp-idf/tr ... eripherals

but I still could not spot the 'can' folder.

I also tried to simply #include "driver/can.h" in my app, but I receive an error during the build process:

fatal error: driver/can.h: No such file or directory
23 | #include "driver/can.h"


I may have overlooked the CAN folders and files, but as I could not find them myself I wanted to ask where are the CAN folder and driver actually located and how can I test the CAN examples and include the CAN functionality in my app ?

Thanks in advance

leo2023
Posts: 2
Joined: Fri Feb 10, 2023 2:47 pm

Re: Location of CAN driver / example

Postby leo2023 » Fri Feb 10, 2023 2:59 pm

Is there any ESP32 CAN module solution in terms of micropython?

ViennaTom
Posts: 4
Joined: Tue Dec 19, 2023 9:19 pm

Re: Location of CAN driver / example

Postby ViennaTom » Mon Jan 22, 2024 9:01 pm

Again support in this forum is VERY bad. Facing the fact that tens of thousand of developers are dealing with these great semiconductors this is really a shame. Thousands of hours of work are wasted because nobody feels responsible to answer even the simplest questions. No clue why that has to be this way !

User avatar
ESP_krzychb
Posts: 400
Joined: Sat Oct 01, 2016 9:05 am
Contact:

Re: Location of CAN driver / example

Postby ESP_krzychb » Tue Jan 23, 2024 6:20 am

Hi @ViennaTom,

The CAN peripheral has been renamed to TWAI.
For the background see Why rename CAN to TWAI?

Related resources:
- ESP-IDF examples: https://github.com/espressif/esp-idf/tr ... erals/twai
- API Reference: https://docs.espressif.com/projects/esp ... /twai.html

Who is online

Users browsing this forum: No registered users and 73 guests