CAN module has been successfully tested! In both versions with and without galvanic isolation.
It has been tested at speeds ranging from 10 Kbps to 1 Mbps. The most important thing is that the capacitive galvanic isolator from the Chinese company 2Pay Semi performed well, I had doubts about it.
In fact, I had to tinker with the testing. I've been testing the communication between two ESP32S3 through CAN. And sometimes everything worked well, but sometimes frames with an empty body were accepted. I spent 2 evenings, but I still didn't understand what the problem was.
It turned out that the problem was with the firmware. When sending a frame, I forgot to set the Remote Transmission Request (RTR) flag in the twai_message_t structure on the stack. This flag took a random value when I flashed the ESP32 switching the CAN speed. As a result, reception worked well at some speeds (RTR=0), and an empty frame body arrived at some speeds (RTR=1).
#nextmodule #can #canbus #module #automotive #plc #automation #iot
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.