This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Help finding DCAN device in Linux SDK

Hello

I am currently attemping to enable the DCAN device in the linux kernel, and after following the guide on this page, I still have no device file at /dev/can0. Is there a special trick to enabling the DCAN driver that I am unaware of? I also tried configuring the driver as a module and loading it with "modprobe d_can"

Thanks

Gregory Dias

  • Hi Gregory,

    Please check this part of the board-am335xevm.c file:

    static void d_can_init(int evm_id, int profile)
    {
        switch (evm_id) {
        case IND_AUT_MTR_EVM:
            if ((profile == PROFILE_0) || (profile == PROFILE_1)) {
                setup_pin_mux(d_can_ia_pin_mux);
                /* Instance Zero */
                am33xx_d_can_init(0);
            }
            break;
        case GEN_PURP_EVM:
        case GEN_PURP_DDR3_EVM:
            if (profile == PROFILE_1) {
                setup_pin_mux(d_can_gp_pin_mux);
                /* Instance One */
                am33xx_d_can_init(1);
            }
            break;
        default:
            break;
        }
    }

    If you are using the AM335x EVM, then please use CPLD Profile 1. If you are using another or a custom board, then please modify the code accordingly, so that the CAN can be initialized.

    After this has been done, you can see the can0 device if you run ifconfig -a. The device can also be found inside the sysfs: /sys/class/net/can0

    Best regards,
    Miroslav

  • Hello Miroslav, thanks for the reply.

    I did as you said and modifired the board-am335xevm.c file. I made the following changes:

    static void d_can_init(int evm_id, int profile)

    {

        int forceType = GEN_PURP_DDR3_EVM;
        switch (forceType) {
            case IND_AUT_MTR_EVM:
                if ((profile == PROFILE_0) || (profile == PROFILE_1)) {
                    setup_pin_mux(d_can_ia_pin_mux);
                    /* Instance Zero */
                    am33xx_d_can_init(0);
                }
                break;
            case GEN_PURP_EVM:
            case GEN_PURP_DDR3_EVM:
                if (true) {
                    setup_pin_mux(d_can_gp_pin_mux);
                    /* Instance One */
                    am33xx_d_can_init(1);
                }
                break;
            default:
                break;
            }

    }

    My development board is the AM335x Starter Kit, so I opted to force the GEN_PURP_DDR3_EVM case. From there I just forced the if statement to be true. However, these changes did not yield any different results. I checked the /dev folder and /sys/class/net folder for a can0 file but there was none.

    Any other thoughts?

    Greg

  • Hi Greg,

    Does "can0" show when you execute: cat /proc/net/dev ?

    Please share your kernel .config file.

    Also please post the output of: dmesg | egrep -i "can"

    Best regards,
    Miroslav

    cat /proc/net/dev

  • Miroslav,

    I executed "cat /proc/net/dev", and here is the output: (my apologies for the formatting)

    Inter-| Receive | Transmit
    face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
    lo: 177219 118 0 0 0 0 0 0 177219 118 0 0 0 0 0 0
    eth1: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
    wlan0: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
    eth0: 31821 167 0 0 0 0 0 0 13358 102 0 0 0 0 0 0

    And the output for the dmesg command:

    [ 1.214233] vcan: Virtual CAN interface driver
    [ 1.218902] CAN device driver interface
    [ 1.222900] CAN bus driver for Bosch D_CAN controller 1.0
    [ 1.575561] can: controller area network core (rev 20090105 abi 8)
    [ 1.586730] can: raw protocol (rev 20090105)
    [ 1.591186] can: broadcast manager protocol (rev 20090105 t)

    I can't seem to find my config file, could you point me in the direction of where to find it?

    Greg

  • Hi Greg,

    The .config file is hidden and it is located inside the kernel base folder. It holds the kernel configuration you have set using menuconfig or similar configurator.

    It doesn't seem like you have enabled the TI High End Can Controller.

    Also please put a debug print inside the d_can_init() function and make sure the d_can is initialized during the board config.

    Best regards,
    Miroslav

  • Here is the .config file.

    1464..config.zip

    I went into menuconfig again and enabled the TI High End CAN Controller. The DCAN guide I posted earlier didn't seem to specify this was necessary.

    After rebuilding the kernel and uploading it to the SD card for my EVM I have no can0 device..

    Where should I bee looking for the d_can_init print statement?

    Also I watched the kernel boot through minicom, and saw this:

    [ 1.202819] CAN device driver interface
    [ 1.206817] CAN bus driver for Bosch D_CAN controller 1.0
    [ 1.212677] TI High End CAN Controller Driver 0.7

    Greg

  • Hi Greg,

    I don't see anything unusual in your .config file.

    Gregory Dias said:
    Where should I bee looking for the d_can_init print statement?

    The debug print should appear in the serial console at boot time. If it doesn't, then you should check why. Please show the print statement you have added.

    Best regards,
    Miroslav

  • I am newb using Bone and SDK with DigiKey can cape.

    Can you give explicit help on where this board file is and how to modify config file I build using the commands within the sdK ie make linux using default config

    Here is my startup

    [ 1.094757] CAN device driver interface
    [ 1.098785] CAN bus driver for Bosch D_CAN controller 1.0
    [ 1.153717] davinci_mdio davinci_mdio.0: davinci mdio revision 1.6
    [ 1.160217] davinci_mdio davinci_mdio.0: detected phy mask fffffffe
    [ 1.167510] davinci_mdio.0: probed
    [ 1.171081] davinci_mdio davinci_mdio.0: phy[0]: device 0:00, driver SMSC LAN 8710/LAN8720
    [ 1.180084] usbcore: registered new interface driver zd1201
    [ 1.186187] usbcore: registered new interface driver cdc_ether
    [ 1.192474] usbcore: registered new interface driver cdc_eem
    [ 1.198608] usbcore: registered new interface driver dm9601
    [ 1.204528] cdc_ncm: 04-Aug-2011
    [ 1.208099] usbcore: registered new interface driver cdc_ncm
    [ 1.214050] Initializing USB Mass Storage driver...
    [ 1.219421] usbcore: registered new interface driver usb-storage
    [ 1.225738] USB Mass Storage support registered.
    [ 1.231140] mousedev: PS/2 mouse device common for all mice
    [ 1.238372] omap_rtc am33xx-rtc: rtc core: registered am33xx-rtc as rtc0
    [ 1.245452] am33xx-rtc: already running
    [ 1.249664] i2c /dev entries driver
    [ 1.254150] Linux video capture interface: v2.00
    [ 1.259368] usbcore: registered new interface driver uvcvideo
    [ 1.265411] USB Video Class driver (1.1.1)
    [ 1.273010] OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [ 1.355987] cpuidle: using governor ladder
    [ 1.360961] cpuidle: using governor menu
    [ 1.367858] omap4_aes_mod_init: loading AM33X AES driver
    [ 1.373565] omap4-aes omap4-aes: AM33X AES hw accel rev: 3.02
    [ 1.380340] omap4_aes_probe: probe() done
    [ 1.385131] omap4_sham_mod_init: loading AM33X SHA/MD5 driver
    [ 1.391357] omap4-sham omap4-sham: AM33X SHA/MD5 hw accel rev: 4.03
    [ 1.405822] omap4_sham_probe: probe() done
    [ 1.419036] usbcore: registered new interface driver usbhid
    [ 1.424926] usbhid: USB HID core driver
    [ 1.430023] usbcore: registered new interface driver snd-usb-audio
    [ 1.438659] ALSA device list:
    [ 1.441772] No soundcards found.
    [ 1.445373] oprofile: hardware counters not available
    [ 1.450683] oprofile: using timer interrupt.
    [ 1.455230] nf_conntrack version 0.5.0 (3956 buckets, 15824 max)
    [ 1.462127] ip_tables: (C) 2000-2006 Netfilter Core Team
    [ 1.467895] TCP cubic registered
    [ 1.471282] NET: Registered protocol family 17
    [ 1.475982] can: controller area network core (rev 20090105 abi 8)
    [ 1.482574] NET: Registered protocol family 29
    [ 1.487274] can: raw protocol (rev 20090105)
    [ 1.491760] can: broadcast manager protocol (rev 20090105 t)

  • I used menuconfig and made sure all the CAN related stuff was enabled as below

    after rebuilding the kernel following AMSDK Linux User's Guide

    I got an error building the kernel modules

    make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- modules

    something about touchscreen I have the Bone it has no touch screen so I am confused

    I also do not know which below config is correct for CAN and the bone 

    For example, to build the default PSP configuration for the AM335x the command would be:
    make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- am335x_evm_defconfig
    To build the SDK configuration for the AM335x the command would be:
    make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- tisdk_am335x-evm_defconfig

    Which one PSP or SDK?

    MenuConfig Options selected below 

    and go to "Networking support" -> "CAN bus subsystem support" 

    choose Raw CAN protocol

    then go to "CAN Device drivers" and select "CAN platform drivers with netlink support" and "CAN bittiming calculation" and "Bosch D_CAN devices" -> "Generic Platform Bus based D_CAN driver"

  • Well I used the defconfig for SDk rebuilt kernel and the modules 

    I want to copy these to the SD card I know where the uImage is but its not clear where I copy the kernel modules and what the command should be below

    make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- INSTALL_MOD_PATH=<path to root of file system> modules_install

  • Hi Mark,

    mark lazarewicz1 said:

    I want to copy these to the SD card I know where the uImage is but its not clear where I copy the kernel modules and what the command should be below

    make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- INSTALL_MOD_PATH=<path to root of file system> modules_install

    The INSTALL_MOD_PATH depends on where your root file system is located. If you are using a NFS file system, then you should point the INSTALL_MOD_PATH to the NFS folder on your host machine. If you are using a filesystem located inside the SD card, then use a card reader to access the /rootfs partition of the SD card and point the INSALL_MOD_PATH to that particular partition (I believe you will need to execute the make modules_install command with sudo in front in this case).

    Best regards,
    Miroslav

  • Hey again Miroslav,

    I put a plain old printf() statement into the d_can_init funtion, located in <SDK-PATH>/board-support/linux-3.2.0/drivers/net/can/d_can/d_can.c. Here is the change:

    .  .  .

    #include <stdio.h>

    .  .  .

    /*
    * Configure D_CAN chip:
    * - enable/disable auto-retransmission
    * - set operating mode
    * - configure message objects
    */
    static void d_can_init(struct net_device *dev)
    {
    struct d_can_priv *priv = netdev_priv(dev);
    u32 cnt;

    printf("!!!!!!!!!!!!DCAN INIT!!!!!!!!!!!!!!");

    netdev_dbg(dev, "resetting d_can ...\n");
    d_can_set_bit(priv, D_CAN_CTL, D_CAN_CTL_SWR);

    /* Enter initialization mode by setting the Init bit */
    d_can_set_bit(priv, D_CAN_CTL, D_CAN_CTL_INIT);

    /* enable automatic retransmission */
    d_can_set_bit(priv, D_CAN_CTL, D_CAN_CTL_ENABLE_AR);

    .  .  .

    }

    .  .  .

    However, after adding this statment, the code won't compile. The compiler claims that it cant find the stdio.h library, which is odd to say the least. Is there an alternate way to print out to the console that the kernel uses? I see in the code statements like "netdev_err(dev, "msg lost in buffer %d\n", objno);", but I dont want to start adding those into the code on a whim.

    Its good to notice that it is attempting to compile and add in the d_can code to the kernel.

    Greg

  • Hi Greg,

    The kernel uses printk() instead of printf(). Also the kernel headers are different from the user space headers you are probably used to.

    For more information about printk() and its log levels, please search google. For example you may check this: http://tuxthink.blogspot.com/2012/07/printk-and-console-log-level.html

    For now, to put a simple print inside the kernel, just use something like this:

    printk(KERN_ALERT "!!!!!!!! DCAN INIT !!!!!!!!\n");

    or the shorter wrapper function:

    pr_alert("!!!!!!!! DCAN INIT !!!!!!!!\n");

    The printk() function can be found here:

    #include <linux/kernel.h>

    Best regards,
    Miroslav

  • Mirsoslav,

    I don't see the printk output in the minicom window anywhere. I DO however see a bunch of CAN related messages in the boot. I'll attach a copy of it for you to look at.

    Greg

    U-Boot 2013.01.01 (Apr 04 2013 - 23:46:57)
    
    I2C:   ready
    DRAM:  256 MiB
    WARNING: Caches not enabled
    NAND:  No NAND device found!!!
    0 MiB
    MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
    *** Warning - readenv() failed, using default environment
    
    musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
    musb-hdrc: MHDRC RTL version 2.0 
    musb-hdrc: setup fifo_mode 4
    musb-hdrc: 28/31 max ep, 16384/16384 memory
    USB Peripheral mode controller at 47401000 using PIO, IRQ 0
    musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
    musb-hdrc: MHDRC RTL version 2.0 
    musb-hdrc: setup fifo_mode 4
    musb-hdrc: 28/31 max ep, 16384/16384 memory
    USB Host mode controller at 47401800 using PIO, IRQ 0
    Net:   <ethaddr> not set. Validating first E-fuse MAC
    cpsw, usb_ether
    Hit any key to stop autoboot:  0 
    mmc0 is current device
    SD/MMC found on device 0
    reading uEnv.txt
    ** Unable to read file uEnv.txt **
    reading uImage
    3191496 bytes read in 349 ms (8.7 MiB/s)
    Booting from mmc ...
    ## Booting kernel from Legacy Image at 80007fc0 ...
       Image Name:   Linux-3.2.0
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    3191432 Bytes = 3 MiB
       Load Address: 80008000
       Entry Point:  80008000
       Verifying Checksum ... OK
       XIP Kernel Image ... OK
    OK
    
    Starting kernel ...
    
    Uncompressing Linux... done, booting the kernel.
    [    0.000000] Linux version 3.2.0 (root@ubuntu) (gcc version 4.5.3 20110311 (prerelease) (GCC) ) #13 Mon Jun 10 06:57:06 PDT 2013
    [    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7d
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [    0.000000] Machine: am335xevm
    [    0.000000] Memory policy: ECC disabled, Data cache writeback
    [    0.000000] AM335X ES1.0 (sgx neon )
    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 65024
    [    0.000000] Kernel command line: console=ttyO0,115200n8 root=/dev/mmcblk0p2 ro rootfstype=ext3 rootwait ip=none
    [    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
    [    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
    [    0.000000] Memory: 256MB = 256MB total
    [    0.000000] Memory: 253196k/253196k available, 8948k reserved, 0K highmem
    [    0.000000] Virtual kernel memory layout:
    [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    [    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    [    0.000000]     vmalloc : 0xd0800000 - 0xff000000   ( 744 MB)
    [    0.000000]     lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
    [    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
    [    0.000000]       .text : 0xc0008000 - 0xc05ab000   (5772 kB)
    [    0.000000]       .init : 0xc05ab000 - 0xc05e7000   ( 240 kB)
    [    0.000000]       .data : 0xc05e8000 - 0xc0651d68   ( 424 kB)
    [    0.000000]        .bss : 0xc0651d8c - 0xc0680964   ( 187 kB)
    [    0.000000] NR_IRQS:396
    [    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
    [    0.000000] Total of 128 interrupts on 1 active controller
    [    0.000000] OMAP clockevent source: GPTIMER2 at 24000000 Hz
    [    0.000000] OMAP clocksource: GPTIMER1 at 32768 Hz
    [    0.000000] sched_clock: 32 bits at 32kHz, resolution 30517ns, wraps every 131071999ms
    [    0.000000] Console: colour dummy device 80x30
    [    0.000152] Calibrating delay loop... 718.02 BogoMIPS (lpj=3590144)
    [    0.058532] pid_max: default: 32768 minimum: 301
    [    0.058685] Security Framework initialized
    [    0.058776] Mount-cache hash table entries: 512
    [    0.059143] CPU: Testing write buffer coherency: ok
    [    0.079650] omap_hwmod: pruss: failed to hardreset
    [    0.080749] print_constraints: dummy: 
    [    0.081115] NET: Registered protocol family 16
    [    0.083221] OMAP GPIO hardware version 0.1
    [    0.085723] omap_mux_init: Add partition: #1: core, flags: 0
    [    0.087646]  omap_i2c.1: alias fck already exists
    [    0.088531]  omap2_mcspi.1: alias fck already exists
    [    0.088806]  omap2_mcspi.2: alias fck already exists
    [    0.089782]  edma.0: alias fck already exists
    [    0.089782]  edma.0: alias fck already exists
    [    0.089813]  edma.0: alias fck already exists
    [    0.116729] bio: create slab <bio-0> at 0
    [    0.118988] SCSI subsystem initialized
    [    0.120574] usbcore: registered new interface driver usbfs
    [    0.120910] usbcore: registered new interface driver hub
    [    0.121093] usbcore: registered new device driver usb
    [    0.121246] musb-ti81xx musb-ti81xx: musb0, board_mode=0x13, plat_mode=0x3
    [    0.121520] musb-ti81xx musb-ti81xx: musb1, board_mode=0x13, plat_mode=0x1
    [    0.138610] omap_i2c omap_i2c.1: bus 1 rev2.4.0 at 100 kHz
    [    0.140472] tps65910 1-002d: JTAGREVNUM 0x0
    [    0.142852] print_constraints: VRTC: 
    [    0.144317] print_constraints: VIO: at 1500 mV 
    [    0.146606] print_constraints: VDD1: 600 <--> 1500 mV at 1262 mV normal 
    [    0.148895] print_constraints: VDD2: 600 <--> 1500 mV at 1137 mV normal 
    [    0.149902] print_constraints: VDD3: 5000 mV 
    [    0.151306] print_constraints: VDIG1: at 1800 mV 
    [    0.152709] print_constraints: VDIG2: at 1800 mV 
    [    0.154144] print_constraints: VPLL: at 1800 mV 
    [    0.155548] print_constraints: VDAC: at 1800 mV 
    [    0.156982] print_constraints: VAUX1: at 1800 mV 
    [    0.158386] print_constraints: VAUX2: at 3300 mV 
    [    0.159851] print_constraints: VAUX33: at 3300 mV 
    [    0.161254] print_constraints: VMMC: at 3300 mV 
    [    0.161743] tps65910 1-002d: No interrupt support, no core IRQ
    [    0.163360] Advanced Linux Sound Architecture Driver Version 1.0.24.
    [    0.164459] Switching to clocksource gp timer
    [    0.179779] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
    [    0.179962] musb-hdrc musb-hdrc.0: dma type: pio
    [    0.180267] MUSB0 controller's USBSS revision = 4ea20800
    [    0.180908] musb-hdrc musb-hdrc.0: USB OTG mode controller at d083c000 using PIO, IRQ 18
    [    0.181060] musb-hdrc musb-hdrc.1: dma type: pio
    [    0.181365] MUSB1 controller's USBSS revision = 4ea20800
    [    0.181549] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
    [    0.181610] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 1
    [    0.181732] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
    [    0.181762] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [    0.181762] usb usb1: Product: MUSB HDRC host driver
    [    0.181793] usb usb1: Manufacturer: Linux 3.2.0 musb-hcd
    [    0.181793] usb usb1: SerialNumber: musb-hdrc.1
    [    0.182586] hub 1-0:1.0: USB hub found
    [    0.182617] hub 1-0:1.0: 1 port detected
    [    0.183135] musb-hdrc musb-hdrc.1: USB Host mode controller at d083e800 using PIO, IRQ 19
    [    0.183563] NET: Registered protocol family 2
    [    0.183746] IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.184051] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
    [    0.184204] TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
    [    0.184295] TCP: Hash tables configured (established 8192 bind 8192)
    [    0.184326] TCP reno registered
    [    0.184326] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [    0.184356] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [    0.184631] NET: Registered protocol family 1
    [    0.184875] RPC: Registered named UNIX socket transport module.
    [    0.184906] RPC: Registered udp transport module.
    [    0.184906] RPC: Registered tcp transport module.
    [    0.184906] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.185150] NetWinder Floating Point Emulator V0.97 (double precision)
    [    0.196289] VFS: Disk quotas dquot_6.5.2
    [    0.196350] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
    [    0.196899] msgmni has been set to 494
    [    0.200073] alg: No test for stdrng (krng)
    [    0.200744] io scheduler noop registered
    [    0.200744] io scheduler deadline registered
    [    0.200805] io scheduler cfq registered (default)
    [    0.201995] Could not set LED4 to fully on
    [    0.203735] omap_uart.0: ttyO0 at MMIO 0x44e09000 (irq = 72) is a OMAP UART0
    [    0.822937] console [ttyO0] enabled
    [    0.827209] omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1
    [    0.834991] omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2
    [    0.842803] omap_uart.3: ttyO3 at MMIO 0x481a6000 (irq = 44) is a OMAP UART3
    [    0.850585] omap_uart.4: ttyO4 at MMIO 0x481a8000 (irq = 45) is a OMAP UART4
    [    0.858398] omap_uart.5: ttyO5 at MMIO 0x481aa000 (irq = 46) is a OMAP UART5
    [    0.866668] omap4_rng omap4_rng: OMAP4 Random Number Generator ver. 2.00
    [    0.882934] brd: module loaded
    [    0.890960] loop: module loaded
    [    0.894409] i2c-core: driver [tsl2550] using legacy suspend method
    [    0.900909] i2c-core: driver [tsl2550] using legacy resume method
    [    0.907348] at24 1-0051: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
    [    0.965026] No daughter card found
    [    0.968627] at24 1-0050: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
    [    0.983825] Board name: A335X_SK
    [    0.987182] Board version: 1.2B
    [    0.990447] The board is a AM335x Starter Kit.
    [    0.995880]  omap_hsmmc.0: alias fck already exists
    [    1.001312]  omap_hsmmc.1: alias fck already exists
    [    1.007324]  da8xx_lcdc.0: alias fck already exists
    [    1.012786] da8xx_lcdc da8xx_lcdc.0: GLCD: Found NHD-4.3-ATXI#-T-1 panel
    [    1.029052] Console: switching to colour frame buffer device 60x34
    [    1.041870]  davinci-mcasp.1: alias fck already exists
    [    1.047760] Configure Bluetooth Enable pin...
    [    1.053253] registered am33xx_sr device
    [    1.057525] _regulator_get: 1-0018 supply Vdd not found, using dummy regulator
    [    1.065155] _regulator_get: 1-0018 supply Vdd_IO not found, using dummy regulator
    [    1.093566] lis3lv02d: 8 bits 3DLH sensor found
    [    1.185485] input: ST LIS3LV02DL Accelerometer as /devices/platform/lis3lv02d/input/input0
    [    1.197204] mtdoops: mtd device (mtddev=name/number) must be supplied
    [    1.204345] omap2-nand driver initializing
    [    1.208831] OneNAND driver initializing
    [    1.214080] vcan: Virtual CAN interface driver
    [    1.218780] CAN device driver interface
    [    1.222778] CAN bus driver for Bosch D_CAN controller 1.0
    [    1.228637] TI High End CAN Controller Driver 0.7
    [    1.275085] davinci_mdio davinci_mdio.0: davinci mdio revision 1.6
    [    1.281555] davinci_mdio davinci_mdio.0: detected phy mask fffffffc
    [    1.289764] davinci_mdio.0: probed
    [    1.293334] davinci_mdio davinci_mdio.0: phy[0]: device 0:00, driver unknown
    [    1.300689] davinci_mdio davinci_mdio.0: phy[1]: device 0:01, driver unknown
    [    1.308410] usbcore: registered new interface driver zd1201
    [    1.314422] usbcore: registered new interface driver cdc_ether
    [    1.320678] usbcore: registered new interface driver cdc_eem
    [    1.326751] usbcore: registered new interface driver dm9601
    [    1.332580] cdc_ncm: 04-Aug-2011
    [    1.336120] usbcore: registered new interface driver cdc_ncm
    [    1.342041] Initializing USB Mass Storage driver...
    [    1.347351] usbcore: registered new interface driver usb-storage
    [    1.353607] USB Mass Storage support registered.
    [    1.358886] mousedev: PS/2 mouse device common for all mice
    [    1.365905] input: ti-tsc as /devices/platform/omap/ti_tscadc/tsc/input/input1
    [    1.374633] omap_rtc am33xx-rtc: rtc core: registered am33xx-rtc as rtc0
    [    1.381683] am33xx-rtc: already running
    [    1.385864] i2c /dev entries driver
    [    1.389892] Linux video capture interface: v2.00
    [    1.395019] usbcore: registered new interface driver uvcvideo
    [    1.401031] USB Video Class driver (1.1.1)
    [    1.426727] OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [    1.435272] cpuidle: using governor ladder
    [    1.440032] cpuidle: using governor menu
    [    1.448822] omap4_aes_mod_init: loading AM33X AES driver
    [    1.454498] omap4-aes omap4-aes: AM33X AES hw accel rev: 3.02
    [    1.461059] omap4_aes_probe: probe() done
    [    1.465728] omap4_sham_mod_init: loading AM33X SHA/MD5 driver
    [    1.471862] omap4-sham omap4-sham: AM33X SHA/MD5 hw accel rev: 4.03
    [    1.483367] omap4_sham_probe: probe() done
    [    1.493499] usbcore: registered new interface driver usbhid
    [    1.499389] usbhid: USB HID core driver
    [    1.504058] tiadc tiadc: attached adc driver
    [    1.512359] usbcore: registered new interface driver snd-usb-audio
    [    1.520782] _regulator_get: 1-001b supply IOVDD not found, using dummy regulator
    [    1.528594] _regulator_get: 1-001b supply DVDD not found, using dummy regulator
    [    1.536254] _regulator_get: 1-001b supply AVDD not found, using dummy regulator
    [    1.543945] _regulator_get: 1-001b supply DRVDD not found, using dummy regulator
    [    1.554382] asoc: tlv320aic3x-hifi <-> davinci-mcasp.1 mapping ok
    [    1.562164] ALSA device list:
    [    1.565307]   #0: AM335X EVM
    [    1.568328] oprofile: hardware counters not available
    [    1.573577] oprofile: using timer interrupt.
    [    1.578063] nf_conntrack version 0.5.0 (3956 buckets, 15824 max)
    [    1.584838] ip_tables: (C) 2000-2006 Netfilter Core Team
    [    1.590515] TCP cubic registered
    [    1.593902] NET: Registered protocol family 17
    [    1.598571] can: controller area network core (rev 20090105 abi 8)
    [    1.605102] NET: Registered protocol family 29
    [    1.609741] can: raw protocol (rev 20090105)
    [    1.614196] can: broadcast manager protocol (rev 20090105 t)
    [    1.620147] Registering the dns_resolver key type
    [    1.625152] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [    1.633148] ThumbEE CPU extension supported.
    [    1.637664] mux: Failed to setup hwmod io irq -22
    [    1.643249] Power Management for AM33XX family
    [    1.648101] Trying to load am335x-pm-firmware.bin (60 secs timeout)
    [    1.654785] Copied the M3 firmware to UMEM
    [    1.659149] Cortex M3 Firmware Version = 0x18
    [    1.663818] smartreflex smartreflex: am33xx_sr_probe: Zero NValue read from EFUSE
    [    1.671661] smartreflex: probe of smartreflex failed with error -22
    [    1.678741] sr_init: platform driver register failed
    [    1.688842] clock: disabling unused clocks to save power
    [    1.707702] Detected MACID=d4:94:a1:86:23:4e
    [    1.712860] mmc0: host does not support reading read-only switch. assuming write-enable.
    [    1.721801] cpsw: Detected MACID = d4:94:a1:86:23:4f
    [    1.727630] mmc0: new high speed SDHC card at address aaaa
    [    1.735198] mmcblk0: mmc0:aaaa SU04G 3.69 GiB 
    [    1.740173] input: gpio-keys as /devices/platform/gpio-keys/input/input2
    [    1.748504] omap_rtc am33xx-rtc: setting system clock to 2013-04-05 12:22:48 UTC (1365164568)
    [    1.757965]  mmcblk0: p1 p2
    [    1.834106] EXT3-fs (mmcblk0p2): recovery required on readonly filesystem
    [    1.841217] EXT3-fs (mmcblk0p2): write access will be enabled during recovery
    [    1.870300] mmc1: card claims to support voltages below the defined range. These will be ignored.
    [    1.892089] mmc1: queuing unknown CIS tuple 0x91 (3 bytes)
    [    1.900634] mmc1: new SDIO card at address 0001
    [    2.104095] kjournald starting.  Commit interval 5 seconds
    [    2.109924] EXT3-fs (mmcblk0p2): recovery complete
    [    2.121887] EXT3-fs (mmcblk0p2): mounted filesystem with ordered data mode
    [    2.129150] VFS: Mounted root (ext3 filesystem) readonly on device 179:2.
    [    2.136596] Freeing init memory: 240K
    INIT: version 2.88 booting
    Starting udev
    [    3.176391] Disabling lock debugging due to kernel taint
    [    4.731781] cfg80211: Calling CRDA to update world regulatory domain
    [    4.871520] wl12xx: driver version: ol_R5.SP4.01-dirty
    [    4.876953] wl12xx: compilation time: Thu Apr  4 23:57:00 2013
    [    4.938201] cfg80211: World regulatory domain updated:
    [    4.943634] cfg80211:     (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
    [    4.952362] cfg80211:     (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
    [    4.960632] cfg80211:     (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
    [    4.968902] cfg80211:     (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
    [    4.977172] cfg80211:     (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
    [    4.985443] cfg80211:     (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
    [    5.403564] wl12xx: loaded
    Starting Bootlog daemon: bootlogd: cannot allocate pseudo tty: No such file or directory
    bootlogd.
    [    5.542816] EXT3-fs (mmcblk0p2): using internal journal
    ALSA: Restoring mixer settings...
    Configuring network interfaces... [    6.056091] net eth0: CPSW phy found : id is : 0x4dd074
    udhcpc (v1.20.2) started
    Sending discover...
    [    8.056671] PHY: 0:00 - Link is Up - 100/Full
    Sending discover...
    Sending select for 10.0.0.100...
    Lease of 10.0.0.100 obtained, lease time 86400
    /etc/udhcpc.d/50default: Adding DNS 130.1.130.3
    /etc/udhcpc.d/50default: Adding DNS 130.1.130.1
    /etc/udhcpc.d/50default: Adding DNS 10.0.0.1
    done.
    INIT: Entering runlevel: 5
    Starting system message bus: dbus.
    Starting Dropbear SSH server: dropbear.
    Starting telnet daemon.
    Performing wifi calibration...
    [   11.187316] wl12xx: loaded
    [   11.204345] wl12xx: power up
    [   11.667694] wl12xx: firmware booted in PLT mode (PLT 6.3.10.0.135)
    Using nvs version 2.1
    Calibrate /lib/firmware/ti-connectivity/wl1271-nvs.bin
    Writing calibration data to /lib/firmware/ti-connectivity/wl1271[   11.741333] wl12xx: power down
    -nvs.bin
    Writing mac address 00:00:00:00:00:00 to file /lib/firmware/ti-connectivity/wl1271-nvs.bin
    Calibration done. FEM1 has 1 bands. AutoFEM is off. Resulting nvs is /lib/firmware/ti-connectivity/wl1271-nvs.bin
    [   12.377319] wl12xx: loaded
    Starting network benchmark server: netserver.
    Starting syslogd/klogd: done
    Starting thttpd.
    Starting PVR
    Error: missing filename.
    Could not find pvrsrvkm driver
    Starting Lighttpd Web Server: lighttpd.
    2013-04-05 12:22:58: (log.c.166) server started 
    /
    Starting Matrix GUI application.
    [   13.574890]  gadget: Mass Storage Function, version: 2009/09/11
    [   13.581207]  gadget: Number of LUNs=1
    [   13.585021]  lun0: LUN: removable file: /dev/mmcblk0p1
    [   13.590423]  gadget: Mass Storage Gadget, version: 2009/09/11
    [   13.596435]  gadget: userspace failed to provide iSerialNumber
    [   13.602539]  gadget: g_mass_storage ready
    [   13.606750] musb-hdrc musb-hdrc.0: MUSB HDRC host driver
    [   13.612335] musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 2
    [   13.620178] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
    [   13.627288] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [   13.634826] usb usb2: Product: MUSB HDRC host driver
    [   13.640014] usb usb2: Manufacturer: Linux 3.2.0 musb-hcd
    [   13.645538] usb usb2: SerialNumber: musb-hdrc.0
    [   13.650878] hub 2-0:1.0: USB hub found
    [   13.654815] hub 2-0:1.0: 1 port detected
    [   14.356719]  gadget: high-speed config #1: Linux File-Backed Storage
    ***************************************************************
    ***************************************************************
    
    

  • Greg I have the same problem with DCAN and  the kernel that is the default one installed in SDK

    If you do ls /proc/net/dev and do not see CAN device its not there

    no matter what the boot says(mine prints the same thing)

    My problem is when I set the correct config in kernel it doesnt build for me

  • I reconfigured the Kernel again from a clean install of the SDK (version 5.07), and installed it to a clean CD card. I am still not having luck with having the CAN driver show up in /dev.

    It seems like in the Linux PSP the default device for the AM335x Starter Kit is dcan1, or at least thats how it appears in the board-am335xevm.c file. I attempted to force a pin mux using the dcan0 pins in the same location of the board-am335xevm.c file, but when I checked the muxing from linux it had been set up with alternate muxing options. 

    I'm confused as to why the initialization code I am changing isn't really affecting the way my device boots. I need to get either of the dcan devices working to continue with development on this platform. Any more insight?

    Greg

  • Hi Greg,

    The initialization of the DCAN pins is done inside the d_can_init() function via the d_can_ia_pin_mux config and the d_can_gp_pin_mux config. There is no usecase for the StarterKit by default inside this function. You will have to write it yourself and then add the d_can_init() function to the evm_sk_dev_cfg configuration structure, but first check if you can actually access those pins on the StarterKit board. Please check Mark's forum thread for more information on how to initialize the DCAN on the SK: http://e2e.ti.com/support/arm/sitara_arm/f/791/p/270232/946257.aspx

    Best regards,
    Miroslav

  • Hi Greg

    <<I'm confused as to why the initialization code I am changing isn't really affecting the way my device boots

    Make sure the code you build is the code running.add some small change and make sure you have confidence in the process otherwise too many unknowns

    I do have a TowerTech CAN cape beside the Digikey I could give it a try AND SHARE RESULTS it useS BOTH dcan CONTROLLERS


  • When checking through linux, the pins that are available to me for dcan0 are uart0_txd and uart0_rxd, and for dcan1 the pins are uart0_ctsn and uart0_rtsn. So I will use those pins for my custom mux options.

    When reading through the board-am335x.c file, there is a case for GEN_PURP_EVM, and GEN_PURP_DDR3_EVM. Is this not the Starter Kit board? I assumed that is was since the Starter kit is purple, and in fact has DDR3 memory on it. If this isn't the case then I need a bit more info about the d_can_init function. When reading Mark's post, my understanding is the EEPROM on the starter kti should have a certain ID, which is used as the profile for the switch statement. What would the starter kit's ID be?

    Also, the setup_pin_mux funtion simply takes in a pinmux_config struct with the configured pins?

    Finally, what is the signifigance of the am33xx_d_can_init function? And the integer it takes as an argument.

    Thanks for all the help so far,

    Greg

  • Hi,

    GEN_PURP_EVM means "General Purpose Evaluation Module". The GEN_PURP_DDR3_EVM is for the EVM boards revision "i-can't-remember-which-exactly" and later that have DDR3 memory. The StarterKit ID is EVM_SK. You can check all the IDs inside the arch/arm/mach-omap2/include/mach/board-am335xevm.h file:

    #define GEN_PURP_EVM        0
    #define IND_AUT_MTR_EVM        1
    #define BEAGLE_BONE_OLD        2
    #define BEAGLE_BONE_A3        3
    #define EVM_SK            4
    #define GEN_PURP_DDR3_EVM    5

    The d_can_init() function checks which board you are using, then set-ups the pinmuxing for the pins you will need and then initializes the DCAN0 or DCAN1 instance via the am33xx_d_can_init(0/1) function. As you have already figured out, the DCAN0 instance uses different pins from the DCAN1 instance.

    Please read my post here and change your board config file according to your use-case for the StarterKit.

    Best regards,
    Miroslav

  • Yes Miroslav

    I say thank you and your Boss needs to give you Big pay raise (-: You are extremely helpful and patient unlike many app engineers

    I will add I have an evm335xSK as well . I was told somewhere on this forum that only the evm supported CAN profile  that the SK did not 

    Thats why I bought the Bone white? I am sorry to confuse thread I better go back and read the whole thread 

    Is this not the case? and Greg  how are you interfacing  evm335xSK to CAN? the Bone is almost 1/3 the price of the evmsk

  • Hi Mark,

    Perhaps this someone was trying to say that only the GP EVM has the needed IC for the CAN signals level translation. The GP EVM daughter board has the ISO1050 IC, which is a galvanically isolated CAN transceiver. Other than this, all three, the GP EVM, the StarterKit, and the BeagleBone use the same processor, which supports the CAN interface.

    Best regards,
    Miroslav

  • Miroslav,

    I made changes as you specified here and in Mark's thread. I now have a can0 device in the /sys/class/net/can0 folder, and by running an ifconfig -a I see the can0 device listed. I will begin testing of the device and report back soon. Thanks for your continued assistance.

    Mark,

    I have modifed the Starter Kit to have an onboard CAN Transciever. It involved eliminating the UART0's usability on the Starter Kit, but I have a second EVM-SK in case I ever need to use UART0 for development. The SK is more expensive, but for my application a touch screen was required.

    Thanks again for all the assistance

    Greg