bb_x15 : DCAN communication problem

114 views
Skip to first unread message

ezio H

unread,
Aug 14, 2018, 3:27:31 AM8/14/18
to BeagleBoard
Link on ti e2e:  https://e2e.ti.com/support/arm/sitara_arm/f/791/t/710355.
bb_x15 's DCAM1 don't work on either ubuntu-16.04.3-minimal-armhf-2017-10-10   or  TI's Arogo
On Arogo,I use:
root@am57xx-evm:~# canconfig can0 bitrate 50000 ctrlmode triple-samplin
[  757.361582] omap_hwmod: dcan1: _wait_target_disable failed
can0 bitrate
: 50000, sample-point: 0.875                              
[  757.376837] omap_hwmod: dcan1: _wait_target_disable failed          
can0 ctrlmode
: loopback[OFF], listen-only[OFF], tripple-sampling[ON],one-shot[OFF], berr-reporting[OFF]
root@am57xx
-evm:~# ifconfig can0 up

And everything about CAN looks good 
root@am57xx-evm:~# lsmod | grep can                                
can_raw                
6589  2                                              
can                    
29904  1 can_raw                                      
c_can_platform          
6638  0        
c_can                  
9718  1 c_can_platform
can_dev                
12397  1 c_can
root@am57xx-evm:~# cat /proc/device-tree/ocp/can\@481cc000/status      
okay



Except: omap_hwmod: dcan1: _wait_target_disable failed.
What should I do with this error messagge 

ezio H

unread,
Aug 14, 2018, 4:14:15 AM8/14/18
to BeagleBoard
arch/arm/mach-omap2/omap_hwmod.c:  line 1845

/**
 * _omap4_disable_module - enable CLKCTRL modulemode on OMAP4
 * @oh: struct omap_hwmod *
 *
 * Disable the PRCM module mode related to the hwmod @oh.
 * Return EINVAL if the modulemode is not supported and 0 in case of success.
 */
static int _omap4_disable_module(struct omap_hwmod *oh)
{
int v;

if (!oh->clkdm || !oh->prcm.omap4.modulemode)
return -EINVAL;

/*
* Since integration code might still be doing something, only
* disable if all lines are under hardreset.
*/
if (_are_any_hardreset_lines_asserted(oh))
return 0;

pr_debug("omap_hwmod: %s: %s\n", oh->name, __func__);

omap_cm_module_disable(oh->clkdm->prcm_partition, oh->clkdm->cm_inst,
       oh->prcm.omap4.clkctrl_offs);

v = _omap4_wait_target_disable(oh);
if (v)
pr_warn("omap_hwmod: %s: _wait_target_disable failed\n",
oh->name);

return 0;
}



在 2018年8月14日星期二 UTC+8下午3:27:31,ezio H写道:

arim...@gmail.com

unread,
Oct 11, 2018, 7:53:59 AM10/11/18
to BeagleBoard
Hi,
Now can you use dcan on bb-x15?
If yes, please advise me how do open it
but it cannot use

เมื่อ วันอังคารที่ 14 สิงหาคม ค.ศ. 2018 14 นาฬิกา 27 นาที 31 วินาที UTC+7, ezio H เขียนว่า:
Message has been deleted

ezio H

unread,
Oct 24, 2018, 5:43:09 AM10/24/18
to BeagleBoard

Hello ,Thanks for reply.
en...Good news is that DCAN can work in loopback mode !
Bad news is still that  DCAN can't use in nomal mode .I keep consulting the TI engineer.

在 2018年10月11日星期四 UTC+8下午7:53:59,arim...@gmail.com写道:

arim...@gmail.com

unread,
Oct 24, 2018, 2:13:01 PM10/24/18
to BeagleBoard
Within the past week I tried to open DCAN. Now it work.
I can send and receive package through DCAN.

1. I follow cross-compiler kernel this link

2. After step download kernel I edit file am57xx-beagle-x15-common.dtsi by reference from am57xx-idk-common.dtsi

&dra7_pmx_core {
        dcan1_pins_default: dcan1_pins_default {
                pinctrl-single,pins = <
                        DRA7XX_CORE_IOPAD(0x37d0, PIN_OUTPUT_PULLUP | MUX_MODE0)        /* dcan1_tx */
                        DRA7XX_CORE_IOPAD(0x37d4, PIN_INPUT_PULLUP | MUX_MODE0)                /* dcan1_rx */
                >;
        };

        dcan1_pins_sleep: dcan1_pins_sleep {
                pinctrl-single,pins = <
                        DRA7XX_CORE_IOPAD(0x37d0, MUX_MODE15 | PULL_UP)        /* dcan1_tx.off */
                        DRA7XX_CORE_IOPAD(0x37d4, MUX_MODE15 | PULL_UP)        /* dcan1_rx.off */
                >;
        };
};

&dcan1 {
        status = "okay";
        pinctrl-names = "default", "sleep", "active";
        pinctrl-0 = <&dcan1_pins_sleep>;
        pinctrl-1 = <&dcan1_pins_sleep>;
        pinctrl-2 = <&dcan1_pins_default>;
};

3. After login debian I open dcan with command : ip link set can0 type can; ifconfig can0 up;

you can see my forum talked with TI engineer


Thank

เมื่อ วันพุธที่ 24 ตุลาคม ค.ศ. 2018 16 นาฬิกา 43 นาที 09 วินาที UTC+7, ezio H เขียนว่า:
Message has been deleted

ezio H

unread,
Nov 1, 2018, 11:08:33 PM11/1/18
to BeagleBoard
Thanks for reply.
Good for you ,but I still can't make dcan1 work using am57xx-beagle-x15-revc.dtb.And what's more ,I even meet a problem that pin (dcan_tx) cannot be control by cpu,no matter in what pin mode (really really annoying ,and I try another bb_X15 board.Then it worked normally .I think that pin is broken ).
Now intead ,I am using dcan2 ,and it works perfectly ,referring to https://e2e.ti.com/support/processors/f/791/p/739907/2743480#2743480.

在 2018年10月25日星期四 UTC+8上午2:13:01,arim...@gmail.com写道:
Reply all
Reply to author
Forward
0 new messages