Closed the0ne closed 4 years ago
This new CAN implementation turns out to work really well.
Is there any test script for testing CAN networking? I got two ESP32-EVB devices with CAN that I could wire together. Anything I need to be aware of with regards to CAN networking?
@the0ne,
I will focused again on CAN shortly.
fantastic - let me know whenever I can help
after having done quite some testing / using the CAN-bus, these are the improvements I have implemented.
Hi Thomas,
I'm working again with CAN on ESP32. Testing this PR with my current CAN nodes HW test, based on PIC18FK MCU doesn't work as expected.
Example code:
-- Attach CAN at 500 Kbps speed can.attach(can.CAN0, 500000)
-- Send a message can.send(can.CAN0, 0x200, can.STD, 1, string.pack("B", 0x01))
PIC18FK MCU nodes don't respond to the sended CAN message. May be something related to 500 Kbps?
Ok, I see the problem.
In current implementation:
https://github.com/whitecatboard/Lua-RTOS-ESP32/wiki/CAN-module
speed is expressed in bits/sec, but in your implementation it's expressed in Kbps.
No problem, I will change the wiki, it's more clear to express speed in Kbps.
Thanks.
only limited testing was posible. please especially verify that CAN networking still works as expected!