element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
BeagleBoard
  • Products
  • Dev Tools
  • Single-Board Computers
  • BeagleBoard
  • More
  • Cancel
BeagleBoard
Forum Enabling DCAN0 (Disabling I2C2)
  • Blog
  • Forum
  • Documents
  • Quiz
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join BeagleBoard to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 8 replies
  • Subscribers 102 subscribers
  • Views 1833 views
  • Users 0 members are here
  • beagleboneback
  • dcan0
  • bbb
Related

Enabling DCAN0 (Disabling I2C2)

robert1
robert1 over 5 years ago

I'm trying to get DCAN0 to work on the Beaglebone Black (the element14 industrial version). Not surprisingly configure-pin doesn't work out of the box since I2C2 is used for Capes.

 

root@beaglebone:~# config-pin p9.19 can Pin is not modifyable: P9_19 i2c2_scl

 

I've no use for the capes (only our custom board). Web searches indicate that it should be possible to disable i2c2 and allow DCAN0 to be enabled. I've not figure out what needs to be done though.

 

On board version:

root@beaglebone:~# uname -a

Linux beaglebone 4.1.15-ti-rt-r43 #1 SMP PREEMPT RT Thu Jan 21 20:13:58 UTC 2016 armv7l GNU/Linux

 

My latest attempt was to follow these instructions to little avail https://www.bacpeters.com/2020/01/25/configuring-the-beaglebone-black-gpio-pins-permanently/

I've also tried disabling the I2C2 following the instructions here http://www.embedded-things.com/bbb/enable-canbus-on-the-beaglebone-black/

And by simply commenting out the I2C2 section in am335x-boneblack or marking it as disabled rather than okay.

 

All attempts appear to be ignored though as config-pin always returns the same error message.

 

Any ideas or pointer to places with working information?

  • Sign in to reply
  • Cancel
Parents
  • aswinvenu
    aswinvenu over 5 years ago

    Hi Robert,

     

      Beaglebone Green comes with the latest debian image and most of the method documented online wont work there.

    Please follow this instructions: https://ralimtek.com/can_bbg/

     

    Let me know if this worked.

     

    Regards,

    Aswin

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • robert1
    robert1 over 5 years ago in reply to aswinvenu

    Maybe I'm missing something but isn't the cape manager deprecated?

     

    I don't see how this would disable I2C2 but would I substitute BB-CAN0 in place of BB-CAN1 to get access to DCAN0? Would that disable I2C2 and the cape detection as required?

     

    Robert

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • mp2100
    mp2100 over 5 years ago in reply to robert1

    I think the answer to your question is yes about CAN0, but I don't have a live CAN bus to test it with.  I followed Jan Cumps instructions.

    Test CAN BUS on BeagleBone

    Which reference Thomas Wedemeyer instructions:

    https://www.thomas-wedemeyer.de/beaglebone-canbus-python.html

    Which also use CAN1, rather than the CAN0 you want.  But when I substitute can0 in all the command lines, all indications on my BBB are that CAN0 is enabled.

     

    Substituting the can0 requirements, I did this (following Thomas Wedemeyer's page)

    config-pin p9.19 can
    config-pin p9.20 can

    and then

     

    sudo ip link set can0 up type can bitrate 125000
     sudo ifconfig can0 up

     

     

    and now I get this response from my BBB

    ~$ ifconfig can0
    can0: flags=193<UP,RUNNING,NOARP>  mtu 16
            unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 10  (UNSPEC)
            RX packets 0  bytes 0 (0.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 0  bytes 0 (0.0 B)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
            device interrupt 42

     

    Note that it says " <UP, RUNNING,NOARP> "  it might be working.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • robert1
    robert1 over 5 years ago in reply to mp2100

    Sorry for the delay I was getting a Cisco console cable do I could get the boot debug information. Even with modifying uEnv.txt I still get

     

    root@beaglebone:~# config-pin p9.19 can

    Pin is not modifyable: P9_19 i2c2_scl

     

    So it appears I2C2 was not disabled by that addition

     

    Robert

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • robert1
    robert1 over 5 years ago in reply to robert1

    So with regards to I2C2 I'm getting the following boot messages

     

    [2.969830] omap_i2c 4819c000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c2_pins, deferring probe

     

     

    [5.163934] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 100 kHz

     

     

    Followed by cape manger messages

    [5.171244]  remoteproc0: powering up wkup_m3
    [5.175646]  remoteproc0: Booting fw image am335x-pm-firmware.elf, size 219735
    [5.177228] bone_capemgr bone_capemgr: Baseboard: 'A335BNLT,EIA0,4618BBBK0D0F'
    [5.177248] bone_capemgr bone_capemgr: compatible-baseboard=ti,beaglebone-black - #slots=4
    [5.198715]  remoteproc0: remote processor wkup_m3 is now up
    [5.198757] wkup_m3_ipc 44e11324.wkup_m3_ipc: CM3 Firmware Version = 0x191
    [5.233448] bone_capemgr bone_capemgr: slot #0: No cape found
    [5.293494] bone_capemgr bone_capemgr: slot #1: No cape found
    [5.353461] bone_capemgr bone_capemgr: slot #2: No cape found
    [5.413460] bone_capemgr bone_capemgr: slot #3: No cape found
    [5.419422] bone_capemgr bone_capemgr: initialized OK.

     

    And ending with

    [   30.369800] omap_i2c 4802a000.i2c: bus 1 rev0.11 at 100 kHz

    [   30.372495] bone_capemgr bone_capemgr: slot #4: dtbo 'cape-universaln-00A0.dtbo' loaded; overlay id #0

     

    For CAN I get

     

    before kernel start

    debug: [console=ttyO0,115200n8 capemgr.enable_partno=BB-CAN0,BB-CAN1 root=UUID=53ae60fe-d040-40fd-96fd-afc59c5146a0 ro rootfstype=ext4 rootwait coherent_pool=1M

     

    Then

    [0.000000] Kernel command line: console=ttyO0,115200n8 capemgr.enable_partno=BB-CAN0,BB-CAN1 root=UUID=53ae60fe-d040-40fd-96fd-afc59c5146a0 ro rootfstype=ext4 rootwait coherent_pool=1M cape_universal=enable

     

     

    [   18.087268] CAN device driver interface

    [   18.135773] c_can_platform 481cc000.can: c_can_platform device registered (regs=fa1cc000, irq=166)

    [   18.315289] c_can_platform 481d0000.can: c_can_platform device registered (regs=fa1d0000, irq=167)

     

    It looks like the interrupts are being registered for both CAN devices. But it's not possible to configure the pins for both.

     

    Robert

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • robert1
    robert1 over 5 years ago in reply to robert1

    So with regards to I2C2 I'm getting the following boot messages

     

    [2.969830] omap_i2c 4819c000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c2_pins, deferring probe

     

     

    [5.163934] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 100 kHz

     

     

    Followed by cape manger messages

    [5.171244]  remoteproc0: powering up wkup_m3
    [5.175646]  remoteproc0: Booting fw image am335x-pm-firmware.elf, size 219735
    [5.177228] bone_capemgr bone_capemgr: Baseboard: 'A335BNLT,EIA0,4618BBBK0D0F'
    [5.177248] bone_capemgr bone_capemgr: compatible-baseboard=ti,beaglebone-black - #slots=4
    [5.198715]  remoteproc0: remote processor wkup_m3 is now up
    [5.198757] wkup_m3_ipc 44e11324.wkup_m3_ipc: CM3 Firmware Version = 0x191
    [5.233448] bone_capemgr bone_capemgr: slot #0: No cape found
    [5.293494] bone_capemgr bone_capemgr: slot #1: No cape found
    [5.353461] bone_capemgr bone_capemgr: slot #2: No cape found
    [5.413460] bone_capemgr bone_capemgr: slot #3: No cape found
    [5.419422] bone_capemgr bone_capemgr: initialized OK.

     

    And ending with

    [   30.369800] omap_i2c 4802a000.i2c: bus 1 rev0.11 at 100 kHz

    [   30.372495] bone_capemgr bone_capemgr: slot #4: dtbo 'cape-universaln-00A0.dtbo' loaded; overlay id #0

     

    For CAN I get

     

    before kernel start

    debug: [console=ttyO0,115200n8 capemgr.enable_partno=BB-CAN0,BB-CAN1 root=UUID=53ae60fe-d040-40fd-96fd-afc59c5146a0 ro rootfstype=ext4 rootwait coherent_pool=1M

     

    Then

    [0.000000] Kernel command line: console=ttyO0,115200n8 capemgr.enable_partno=BB-CAN0,BB-CAN1 root=UUID=53ae60fe-d040-40fd-96fd-afc59c5146a0 ro rootfstype=ext4 rootwait coherent_pool=1M cape_universal=enable

     

     

    [   18.087268] CAN device driver interface

    [   18.135773] c_can_platform 481cc000.can: c_can_platform device registered (regs=fa1cc000, irq=166)

    [   18.315289] c_can_platform 481d0000.can: c_can_platform device registered (regs=fa1d0000, irq=167)

     

    It looks like the interrupts are being registered for both CAN devices. But it's not possible to configure the pins for both.

     

    Robert

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • aswinvenu
    aswinvenu over 5 years ago in reply to robert1

    Hi Robert,

     

    Are you familiar with IRC chatting? Beagle Bone boards have a quite active IRC chat group on freenode. Please ask this question there as well.

    Someone online may be able to give you hints on how to tackle this issue.

     

    #beagle on Freenode

    Regards.

    Aswin

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • robert1
    robert1 over 5 years ago in reply to aswinvenu

    I'm not actually, despite being on the internet in some form since the late 80's

     

    Robert

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube