Become a leader in the IoT community!

Join our community of embedded and IoT practitioners to contribute experience, learn new skills and collaborate with other developers with complementary skillsets.

Step 1 of 5

CREATE YOUR PROFILE *Required

OR
Step 2 of 5

WHAT BRINGS YOU TO DEVHEADS? *Choose 1 or more

Connect & collaborate 🀝with other tech professionals
Learn & Grow πŸ“š
Contribute Experience & Expertise πŸ”§
Step 3 of 5

WHAT'S YOUR INTEREST OR EXPERTISE? *Choose 1 or more

Hardware Design πŸ’‘
Embedded Software πŸ’»
Edge Networking ⚑
Step 4 of 5

Personalize your profile

Step 5 of 5

Read & agree to our COMMUNITY RULES

  1. We want this server to be a welcoming space! Treat everyone with respect. Absolutely no harassment, witch hunting, sexism, racism, or hate speech will be tolerated.
  2. If you see something against the rules or something that makes you feel unsafe, let staff know by messaging @admin in the "support-tickets" tab in the Live DevChat menu.
  3. No age-restricted, obscene or NSFW content. This includes text, images, or links featuring nudity, sex, hard violence, or other graphically disturbing content.
  4. No spam. This includes DMing fellow members.
  5. You must be over the age of 18 years old to participate in our community.
  6. You agree to our Terms of Service (https://www.devheads.io/terms-of-service/) and Privacy Policy (https://www.devheads.io/privacy-policy)
By clicking "Finish", you have read and agreed to the our Terms of Service and Privacy Policy.

Can anyone successfully build this samples/drivers/can/babbling for any espressif board?

Been working on a CAN network with an esp32 sender and a stm32 bluepill receiver. Both done in Zephyr.

  1. 32bitSaviour#0000

    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?

  2. 32bitwidesaviour#0000

    help a stuck man @superbike_z

  3. superbike_z#0000

    whats your esp board name @32bitwidesaviour

  4. superbike_z#0000

    And where is yours failing

  5. superbike_z#0000

    Mine is failing as well but with a build error

  6. 32bitwidesaviour#0000

    “`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)
    “`

  7. superbike_z#0000

    Ok same issue for me

  8. 32bitwidesaviour#0000

    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.

  9. superbike_z#0000

    Ok I’m in the same place, do you want to check the github for this issue?

  10. 32bitwidesaviour#0000

    I will keep you in the know.

  11. superbike_z#0000

    fail loudly if anything comes up @32bitwidesaviour

  12. 32bitwidesaviour#0000

    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.

  13. 32bitwidesaviour#0000

    turns out `CONFIG_CAN=y` doesn’t enable the can node in the generated dts
    image.png

  14. superbike_z#0000

    What else do you need?

  15. 32bitwidesaviour#0000

    Need to add an overlay that changes the status to “okay”.

  16. superbike_z#0000

    @32bitwidesaviour can you jump on rtfes.devheads.io?

  17. superbike_z#0000

    tell me if you see video

  18. 32bitwidesaviour#0000

    Yeah. Right away

  19. 32bitwidesaviour#0000

    no remote video available

  20. 32bitwidesaviour#0000

    but my browser tab indicates something is playing

  21. 32bitwidesaviour#0000

    we are a-building. Enabling status in the overlay solved it

    &twai {
          status = "okay";
    };
  22. 32bitwidesaviour#0000

    *** Booting Zephyr OS build v4.0.0-2949-ge1f15e511ed3 ***
    [00:00:00.000,000] canopen_driver: CO_CANmodule_init: rxSize = 13, txSize = 9
    [00:00:00.000,000]
    canopen_driver: CO_CANmodule_init: excessive number of concurrent CAN RX filters enabled (needs 13, 14 available)
    [00:00:00.000,000] app: CANopen stack initialized
    [00:00:00.000,000]
    app: Green LED not available
    [00:00:00.000,000]
    app: Red LED not available
    [00:00:00.010,000] canopen_driver: failed to send CAN frame (err -114)
    [00:00:00.020,000]
    canopen_driver: failed to send CAN frame (err -114)
    [00:00:00.040,000]
    canopen_driver: failed to send CAN frame (err -114)
    [00:00:00.050,000]
    canopen_driver: failed to send CAN frame (err -114)
    [00:00:00.070,000]
    canopen_driver: failed to send CAN frame (err -114)
    [00:00:00.081,000]
    canopen_driver: failed to send CAN frame (err -114)
    [00:00:00.092,000]
    canopen_driver: failed to send CAN frame (err -114)
    [00:00:00.102,000]
    canopen_driver: failed to send CAN frame (err -114)
    [00:00:00.113,000]
    canopen_driver: failed to send CAN frame (err -114)
    [00:00:00.124,000]
    canopen_driver: failed to send CAN frame (err -114)

  23. 32bitwidesaviour#0000

    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.

  24. 32bitwidesaviour#0000

    Oh shoot my transceiver is faulty.
    I am getting very around 0.8 and 0.9 voltages between can hi and gnd.

  25. techielew#0000

    What logic analyzer are you using?

  26. umeshlokhande#0000

    wondering which exact CAN transceiver module or IC ur using

  27. 32bitwidesaviour#0000

    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

  28. 32bitwidesaviour#0000

    The CAN transceiver is a TJA1050.
    Doing comms between an esp32 and a bluepill

  29. jeremycook#0000

    Hrmmm. That is a good idea!

  30. superbike_z#0000

    CAN on a digital oscilloscope is just hard

  31. superbike_z#0000

    especially if you are making the bus yourself

  32. 32bitwidesaviour#0000

    Made an order for a couple of CAN transceiver and a logic analyzer.

  33. 32bitwidesaviour#0000

    Moving to some ethernet work while I wait on that.

  34. undefined2001#0000

    Are you going to use any prewritten ethernet driver or your own?

  35. 32bitwidesaviour#0000

    We are working in zephyr and are working with its ethernet support.

  36. undefined2001#0000

    no matter what i do in my heads it always rings like write your own driverπŸ€•

  37. undefined2001#0000

    I know it’s not relevant though

  38. 32bitwidesaviour#0000

    good for fun. slow and tiresome for production.

  39. undefined2001#0000

    not even good

  40. undefined2001#0000

    it’s actually time consuming

  41. undefined2001#0000

    but a good way to learn

  42. undefined2001#0000

    I should also try to use Zephyr due to all the built in stack it comes with

  43. undefined2001#0000

    like ethernet, ble, wifi

  44. 32bitwidesaviour#0000

    go for it. I enjoy Zephyr

CONTRIBUTE TO THIS THREAD

Browse other questions tagged 

Leaderboard

RANKED BY XP

All time
  • 1.
    Avatar
    @Nayel115
    1620 XP
  • 2.
    Avatar
    @UcGee
    650 XP
  • 3.
    Avatar
    @melta101
    600 XP
  • 4.
    Avatar
    @chitour
    600 XP
  • 5.
    Avatar
    @lifegochi
    250 XP
  • 6.
    Avatar
    @Youuce
    180 XP