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 Driver #198
Comments
Hi, no specific reason, it's just that nobody needed it yet :-). Didn't even know that ESP32 has CAN bus integrated... We have a FreeRTOS port of the driver that works with an self-written hardware layer driver. That's why I didn't add it to main repo. |
Yes! I guess that will be great if I can reuse the sync macros for FreeRTOS, I was about to start digging in Zephyr as they support ESP32. But I'd like to learn FreeRTOS more |
https://github.com/martinwag/CANopenNode/tree/neuberger-freertos/stack/neuberger-FreeRTOS This is based on v1.3-master repo. Please be aware that this was not made to be added to main stack.
|
Well thanks, I'm doing some progress here, got the library kind of working, still need many details. I am using PlatformIO, so project structure has changed, now all .h files are in an include folder, and c files in other. The esp32 has a custom FreeRTOS, modified mostly because the esp32 is a dual core mcu, it is based in FreeRTOS 8, and the code you gave me is using stuff which is not available in that version, so wasn't a plug and play solution. I really don't know where to start for PDO stuff, as I'm very new to CANopen and even CAN Bus, I still need to figure out how to setup PDO communication, unfortunately this is not in the great readme guide of CANopenNode which I'm using successfully with a Raspberry PI and I connected an MCP2515 to it. I see there are at least 2 ways of sending PDOs,
|
You setup PDOs in running CANopen network by changing PDO mapping and communication parameters. Your application must only use some variable from OD and "fill" it with data. This variable is then ready to be mapped into TPDO, for example. |
Thank you! I got it working now, it sends data when it changes, still need to learn how the SYNC option works Quick question, is the library comparing memory to check if there is a need to send a TPDO? |
Yes. |
Im really interested in running CanOpen on ESP32, our project will have several boards with ESP32 SOCs communicating with eachother, connected through a CANbus. I already have a propriety protocol running, but looking to expand and standardize the communication so we can create a more generic solution. @guillermo-ruffino Are you willing to share your results so far? |
I added a link to Neuberger-FreeRTOS into |
@Bascy yes, I haven't worked much on this after my last comment, but I can send you what I have done which is not much, but will allow you to start working from something that communicates data. The easiest for me will be to zip the thing and send it to you or post it here, I'm using platformio to build the project on vscode, so I had to modify the structure, all .h files are in an include folder, etc. |
@guillermo-ruffino Thanks, a zip to basschouten65(AT)gmail.com would be great |
hope this helps! |
CANopen is the internationally standardized higher-layer protocol for embedded control system built on top of CAN. |
@guillermo-ruffino, thank you, link to your file is now in deviceSupport.md |
As I am also interested to use CANopenNode on ESP32: Has anyone tried to integrate the work of @guillermo-ruffino into the Eclipse IDE? @guillermo-ruffino: Thanks for your very kind contribution! Did you make any progress since you provided the link to the zip archive? I am wondering if PDO Tx/Rx is working and if Sync objects can be processed? Thanks a lot for your feedback! |
I am also interested in CANopen for ESP32. still the most recent work to start from / continue with? |
Hi Maksims,
I have not done anything for getting CANopenNode running on ESP32, sorry.
Josef
… Am 06.05.2022 um 14:17 schrieb Maksims Kuznecovs ***@***.***>:
I am also interested in CANopen for ESP32. My question: is
esp32_CANopenNode.zip <https://github.com/CANopenNode/CANopenNode/files/4921689/esp32_CANopenNode.zip>
still the most recent work to start from / continue with?
Hi guys. Currently I work on the ESP32 project translating OPC UA commands into CANopen commands for a motor control. I was wondering if any of you made progress on getting TPDO, RPDOS, Sync, etc. working on ESP32 (esp-idf framework)?
—
Reply to this email directly, view it on GitHub <#198 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ASLHBEFUXS5AWZCZAORETFDVIUEVRANCNFSM4OC5OU5Q>.
You are receiving this because you commented.
|
For anyone interested, here's a version of the object dictionary file that works with the current version of CanOpenEditor. Note that, as of writing this comment, the latest binary release contains a bug in which the logic is reversed for RPDO/TPDO mappings (see this PR), so either build from the bugfix branch or apply the patch from the PR manually. Don't forget to switch the exporter to CANOPEN_LEGACY. Also, remember to set deviceFile_barebones.xdd.txt (remove .txt from filename) |
Is there any reason ESP32 is not done already? (Other than nobody did it I mean)
I might need this so I can try, I'm pretty new to can bus and can open in general, so quite lost.
I've been looking what is needed to support it, and I guess I could try to adapt the SDK given by espressif for the driver.
This thing uses FreeRTOS, so for thread management, etc, is there some driver which uses this already I could look into? I only found #28 (comment) regarding FreeRTOS so far.
I'm building my own network of nodes, so no compatibility with other systems is needed so far, so I still have to learn how to setup the nodes, if I understand properly, I have to use the example and somehow configure them differently so they are different nodes?
I have ESP32's and sn65hvd230 transceivers to connect them. I've already got them communicating in plain can bus.
I don't expect full feedback of this broad question, just any tips you think are worth mentioning I'll appreciate.
The text was updated successfully, but these errors were encountered: