UART1 pin conflict, when using LCD and CAN capes

216 views
Skip to first unread message

William

unread,
Oct 26, 2017, 2:34:23 AM10/26/17
to BeagleBoard
Hello,

The scope of my project is to get CAN messages from CAN bus and display some information on an LCD.

The HW components used:
- BeagleBone Black
SW: Debian 9.2 2017-10-10 4GB SD IoT 

I installed bb.org-overlays. 

root@beaglebone:~# cat /sys/devices/platform/bone_capemgr/slots
 
0: P---L-   0 4D 4.3 LCD CAPE - 4DCAPE-43T,00A1,4D Systems,BB-BONE-4D4R-01
 
1: PF----  -1
 
2: PF----  -1
 
3: PF----  -1

When I try to enable the CAN cape:
echo BB-CAN1 > /sys/devices/platform/bone_capemgr/slots
-bash: echo: write error: File exists


I also tried to enable the cape from uEnv.txt file:
cape_enable=bone_capemgr.enable_partno=BB-CAN1
[    3.557591] bone_capemgr bone_capemgr: slot #4: BB-CAN1 conflict P9.26 (#0:BB-BONE-4D4R-01)
[    3.566124] bone_capemgr bone_capemgr: slot #4: Failed verification
[    3.586720] bone_capemgr bone_capemgr: loader: failed to load slot-4 BB-CAN1:00A0 (prio 0)

In BB-BONE-4D4R-01-00A1.dts device tree source file, pin P9.26 on BBB UART1_RX is used by LCD cape.
So far, I am able to use one cape at a time.

How can I change the device tree files in order to be able to use both capes simultaniously?
Since CAN cape provide a UART selection, can other UART be configured as CAN interface?

Being in this stuck point for some time, any idea is very appreciated. Thank you.

Robert Nelson

unread,
Oct 26, 2017, 7:37:51 AM10/26/17
to Beagle Board, Dragos P
P9.26 is the touchscreen interrupt pin. So if you don't mind losing that feature of the LCD.

Regards,

William

unread,
Oct 26, 2017, 8:13:52 AM10/26/17
to BeagleBoard
Thank you, 
Can I change the pin map for P9.26 to use another pin? Or maybe change the CAN interface to another UART?

Robert Nelson

unread,
Oct 26, 2017, 8:20:42 AM10/26/17
to Beagle Board
On Thu, Oct 26, 2017 at 7:13 AM, William <pana...@gmail.com> wrote:
> Thank you,
> Can I change the pin map for P9.26 to use another pin? Or maybe change the
> CAN interface to another UART?

Sure, just spin an adapter PCB board and move it, it only has to be
one layer, so it'll be cheap..

Regards,


--
Robert Nelson
https://rcn-ee.com/

William

unread,
Oct 27, 2017, 1:53:45 AM10/27/17
to BeagleBoard
Ok, but I guess I will have the same conflict with device tree files.
I tried to modify the dts file for CAN1 to use CAN0 interface (pins 9.19, 9.20).

Then I compiled the file and copied to /lib/firmware
dtc -O dtb -o BB-CAN1-00A1.dtbo -b 0 -@ BB-CAN1-00A1.dts

I updated the init image with
update-initramfs -uk 4.4.91-ti-r133

I also tried to enable from /boot/uEnv.txt:
cape_enable=bone_capemgr.enable_partno=BB-CAN1

Can you please tell me what I am doing wrong?
Reply all
Reply to author
Forward
0 new messages