Become a leader in the IoT community!
New DevHeads get a 320-point leaderboard boost when joining the DevHeads IoT Integration Community. In addition to learning and advising, active community leaders are rewarded with community recognition and free tech stuff. Start your Legendary Collaboration now!
I can successfully build for the bluepill `stm32f103_mini` having issues with the esp32 build, issue looks to be in device tree generation not sure what at the moment.
Which sort of persists when I try to build even the zephyr samples,
Can anyone successfully build this `samples/drivers/can/babbling` for any espressif board?
help a stuck man @superbike_z
whats your esp board name @32bitwidesaviour
And where is yours failing
Mine is failing as well but with a build error
“`zephyr/include/zephyr/device.h:96:41: error: ‘__device_dts_ord_40’ undeclared (first use in this function); did you mean ‘__device_dts_ord_30’?
96 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
“`
Ok same issue for me
just found out about espressif `twai`
Espressif ESP32 Two-Wire Automotive Interface (TWAI), its can.
Added
“`/ {
chosen {
zephyr,canbus = &twai;
};
};“` to be more explicit still stuck here.
I will cast my eyes somewhere else.
Ok I’m in the same place, do you want to check the github for this issue?
I will keep you in the know.
fail loudly if anything comes up @32bitwidesaviour
Coming to realize that the undefined reference to __device… is a generic problem that happens if you try to get a device pointer from a devicetree node if no such device exists.
turns out `CONFIG_CAN=y` doesn’t enable the can node in the generated dts
What else do you need?
Need to add an overlay that changes the status to “okay”.
@32bitwidesaviour can you jump on rtfes.devheads.io?
tell me if you see video
Yeah. Right away
no remote video available
but my browser tab indicates something is playing
we are a-building. Enabling status in the overlay solved it
*** Booting Zephyr OS build v4.0.0-2949-ge1f15e511ed3 *** canopen_driver: CO_CANmodule_init: rxSize = 13, txSize = 9 canopen_driver: CO_CANmodule_init: excessive number of concurrent CAN RX filters enabled (needs 13, 14 available) app: CANopen stack initialized app: Green LED not available app: Red LED not available canopen_driver: failed to send CAN frame (err -114) canopen_driver: failed to send CAN frame (err -114) canopen_driver: failed to send CAN frame (err -114) canopen_driver: failed to send CAN frame (err -114) canopen_driver: failed to send CAN frame (err -114) canopen_driver: failed to send CAN frame (err -114) canopen_driver: failed to send CAN frame (err -114) canopen_driver: failed to send CAN frame (err -114) canopen_driver: failed to send CAN frame (err -114) canopen_driver: failed to send CAN frame (err -114)
[00:00:00.000,000]
[00:00:00.000,000]
[00:00:00.000,000]
[00:00:00.000,000]
[00:00:00.000,000]
[00:00:00.010,000]
[00:00:00.020,000]
[00:00:00.040,000]
[00:00:00.050,000]
[00:00:00.070,000]
[00:00:00.081,000]
[00:00:00.092,000]
[00:00:00.102,000]
[00:00:00.113,000]
[00:00:00.124,000]
Everything is properly wired up but I am getting these from the `bluepill`.
Will need to get a logic analyzer to see if CAN TX/RX signals between the chip controller and the CAN transceiver.
Oh shoot my transceiver is faulty.
I am getting very around 0.8 and 0.9 voltages between can hi and gnd.
What logic analyzer are you using?
wondering which exact CAN transceiver module or IC ur using
Don’t have one on me. Resorted to the good old multimeter, testing between CAN HI and GND then CAN LO and GND.
For this transceiver, when connected to one of the devices I am testing the voltage between HI and gnd should be between 2.5 and 3.0 and LO abd gnd should be 2.0 and 2.5.
Values I get are very low in the range of 0.8 – 1.1
The CAN transceiver is a TJA1050.
Doing comms between an esp32 and a bluepill
Hrmmm. That is a good idea!
CAN on a digital oscilloscope is just hard
especially if you are making the bus yourself
Made an order for a couple of CAN transceiver and a logic analyzer.
Moving to some ethernet work while I wait on that.
CONTRIBUTE TO THIS THREAD