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.

Linux/AM4376: CAN error

Part Number: AM4376

Tool/software: Linux

Hi

We are having problem with can driver. When we up the network with ip link set up can0, there is a timeut error in kernel messages:

c_can_hw_raminit_wait_syscon: time out

Unfortunately I don't the the kernel log and dts file but the customers told me that the board dts file hasn't changed from EVM just activated the dcan0 and dcan1. Also there aren't any errors related to CAN driver in the kernel log.

I did some research and found out others have this problem too.

So what this message means?

Regards,

Robert

  • Robert,

    Please provide information at least which Linux version you use. The DTS and log file will also help.
  • Hi Biser

    It's the lastest TI SDK, Kernel 4.9.41
    And CAN node in dts files has not been changed.

    Sorry that I don't have more information now. They want to know what this error means and could it be a problem?

  • I tested can0 and can1, they work. But the message is still there.
  • Hi Robert,

    I will look more into the message, but for the moment what kernel configuration is being used? Is it the TI provided kernel configuration? Can you please attach the kernel configuration if it has been changed?

    Thanks and Best Regards,
    Schuyler
  • Hi

    The Kernel config has been changed. But the source is TI SDK.

    Others have this problem too. I've even seen it on Compulab's CM-T43 and CL-SOM-AM57x page.

    I guess that if you try on EVM boards you should see this message too.

    3056..config.zip

  • Hi,

    Thanks for posting the kernel configuration. The config has the CAN driver modules as built in (Y), the TI config has these as loadable modules (M).

    I would like to recommend trying to set the CAN support in the kernel configuration per the attached document as a test to see if this removes the message that you are seeing. I brought up a CAN interface on the AM335x and did not see the timeout message using the prebuilt TI kernel.

    Best Regards,

    Schuyler

    TI_CAN_default_kernel_config.docx

  • Hi Schuyler

    Beacuse they want to run a minimum OS and don't want to use insmod or modprobe. All kernel drivers are built-in.
    Is it important for the CAN driver to load this way?
    Also you should try on AM437x or AM57x boards.

    Regards,
    Robert
  • Hi Robert,

    I will try the driver test on an AM437 board. The internal IP though is the same for the AM3,AM4 and AM5 processors, I don't expect a difference but it should be confirmed.

    I will need to check with the driver team on if built-in vs. loadable is the difference. Just to confirm though, the interface is working it is just the message itself that is concerning? Looking at the code in the driver that shows when the message is printed out there is no action taken by the driver due to the timeout being encountered. Also it should be noted this driver was written mostly by the Linux community.

    Earlier you mentioned that you did not have the console log, if the customer will share the log could you please attach a console log from the customer's board showing the message?

    Thanks and Best Regards,
    Schuyler
  • Hi

    Schuyler Patton said:

    I will try the driver test on an AM437 board. The internal IP though is the same for the AM3,AM4 and AM5 processors, I don't expect a difference but it should be confirmed.


    Thank You.

    Schuyler Patton said:

    Just to confirm though, the interface is working it is just the message itself that is concerning?


    Yes, It's working. But the message is concerning as you said.

    Schuyler Patton said:

    Looking at the code in the driver that shows when the message is printed out there is no action taken by the driver due to the timeout being encountered. Also it should be noted this driver was written mostly by the Linux community.


    Yes, I checked the message source first time I've seen it. It just returns and function is void. There is no difference between normal exit or timeout.

    Schuyler Patton said:

    Earlier you mentioned that you did not have the console log, if the customer will share the log could you please attach a console log from the customer's board showing the message?


    I attached the log of the board that I'm working on, It has the same problem.

    Regards,
    Robert

    4212.Boot Log.txt
    Starting kernel ...
    
    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Linux version 4.9.41 (****@****) (gcc version 6.3.1 20170404 (Linaro GCC 6.3-2017.05) ) #1 PREEMPT RT ************
    [    0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c5387d
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [    0.000000] OF: fdt:Machine model: ****
    [    0.000000] cma: Reserved 64 MiB at 0x9c000000
    [    0.000000] Memory policy: Data cache writeback
    [    0.000000] CPU: All CPU(s) started in SVC mode.
    [    0.000000] AM437x ES1.2 (neon)
    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 129920
    [    0.000000] Kernel command line: console=ttyS0,115200n8
    [    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
    [    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
    [    0.000000] Memory: 442584K/524288K available (5120K kernel code, 231K rwdata, 1064K rodata, 3072K init, 284K bss, 16168K reserved, 65536K cma-reserved, 0K highmem)
    [    0.000000] Virtual kernel memory layout:
    [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    [    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    [    0.000000]     vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)
    [    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
    [    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    [    0.000000]       .text : 0xc0008000 - 0xc0600000   (6112 kB)
    [    0.000000]       .init : 0xc0800000 - 0xc0b00000   (3072 kB)
    [    0.000000]       .data : 0xc0b00000 - 0xc0b39e60   ( 232 kB)
    [    0.000000]        .bss : 0xc0b3b000 - 0xc0b82160   ( 285 kB)
    [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    [    0.000000] Preemptible hierarchical RCU implementation.
    [    0.000000]  Build-time adjustment of leaf fanout to 32.
    [    0.000000] NR_IRQS:16 nr_irqs:16 16
    [    0.000000] L2C: platform modifies aux control register: 0x0e030000 -> 0x3e430000
    [    0.000000] L2C: DT/platform modifies aux control register: 0x0e030000 -> 0x3e430000
    [    0.000000] L2C-310 erratum 769419 enabled
    [    0.000000] L2C-310 enabling early BRESP for Cortex-A9
    [    0.000000] OMAP L2C310: ROM does not support power control setting
    [    0.000000] L2C-310 dynamic clock gating disabled, standby mode disabled
    [    0.000000] L2C-310 cache controller enabled, 16 ways, 256 kB
    [    0.000000] L2C-310: CACHE_ID 0x410000c9, AUX_CTRL 0x4e430000
    [    0.000000] OMAP clockevent source: timer2 at 24000000 Hz
    [    0.000010] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
    [    0.000020] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
    [    0.000025] OMAP clocksource: timer1 at 24000000 Hz
    [    0.000151] sched_clock: 64 bits at 500MHz, resolution 2ns, wraps every 4398046511103ns
    [    0.000160] clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0xe6a171a037, max_idle_ns: 881590485102 ns
    [    0.000175] Switching to timer-based delay loop, resolution 2ns
    [    0.000610] clocksource: 32k_counter: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 58327039986419 ns
    [    0.000614] OMAP clocksource: 32k_counter at 32768 Hz
    [    0.001002] Console: colour dummy device 80x30
    [    0.001134] Calibrating delay loop (skipped), value calculated using timer frequency.. 1000.00 BogoMIPS (lpj=5000000)
    [    0.001138] pid_max: default: 32768 minimum: 301
    [    0.001252] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.001258] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.001978] CPU: Testing write buffer coherency: ok
    [    0.002248] Setting up static identity map for 0x80100000 - 0x80100060
    [    0.003596] devtmpfs: initialized
    [    0.014222] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
    [    0.014508] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [    0.014535] futex hash table entries: 256 (order: 1, 8192 bytes)
    [    0.022498] pinctrl core: initialized pinctrl subsystem
    [    0.023499] NET: Registered protocol family 16
    [    0.039158] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [    0.126407] omap_l3_noc 44000000.ocp: L3 debug error: target 8 mod:0 (unclearable)
    [    0.126573] omap_l3_noc 44000000.ocp: L3 application error: target 8 mod:0 (unclearable)
    [    0.130702] omap_gpio 44e07000.gpio: could not find pctldev for node /ocp@44000000/l4_wkup@44c00000/scm@210000/pinmux@800/gpio0_pins_default, deferring probe
    [    0.131003] omap_gpio 4804c000.gpio: could not find pctldev for node /ocp@44000000/l4_wkup@44c00000/scm@210000/pinmux@800/gpio1_pins_default, deferring probe
    [    0.132838] OMAP GPIO hardware version 0.1
    [    0.133347] omap_gpio 481ae000.gpio: could not find pctldev for node /ocp@44000000/l4_wkup@44c00000/scm@210000/pinmux@800/gpio3_pins_default, deferring probe
    [    0.133656] omap_gpio 48320000.gpio: could not find pctldev for node /ocp@44000000/l4_wkup@44c00000/scm@210000/pinmux@800/gpio4_pins_default, deferring probe
    [    0.133936] omap_gpio 48322000.gpio: could not find pctldev for node /ocp@44000000/l4_wkup@44c00000/scm@210000/pinmux@800/gpio5_pins_default, deferring probe
    [    0.136769] omap-gpmc 50000000.gpmc: could not find pctldev for node /ocp@44000000/l4_wkup@44c00000/scm@210000/pinmux@800/gpmc_pins_default, deferring probe
    [    0.138790] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
    [    0.138804] hw-breakpoint: maximum watchpoint size is 4 bytes.
    [    0.149079] edma 49000000.edma: TI EDMA DMA engine driver
    [    0.150810] pps_core: LinuxPPS API ver. 1 registered
    [    0.150823] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    0.150843] PTP clock support registered
    [    0.150849] EDAC MC: Ver: 3.0.0
    [    0.151658] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
    [    0.152387] clocksource: Switched to clocksource arm_global_timer
    [    0.159824] NET: Registered protocol family 2
    [    0.160553] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
    [    0.160606] TCP bind hash table entries: 4096 (order: 4, 98304 bytes)
    [    0.160846] TCP: Hash tables configured (established 4096 bind 4096)
    [    0.160933] UDP hash table entries: 256 (order: 2, 16384 bytes)
    [    0.160983] UDP-Lite hash table entries: 256 (order: 2, 16384 bytes)
    [    0.161260] NET: Registered protocol family 1
    [    0.342145] workingset: timestamp_bits=14 max_order=17 bucket_order=3
    [    0.351691] NET: Registered protocol family 38
    [    0.351916] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
    [    0.351930] io scheduler noop registered
    [    0.351936] io scheduler deadline registered
    [    0.352052] io scheduler cfq registered (default)
    [    0.353394] pinctrl-single 44e10800.pinmux: 199 pins at pa f9e10800 size 796
    [    0.400126] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
    [    0.402125] omap8250 44e09000.serial: No clock speed specified: using default: 48000000
    [    0.403019] console [ttyS0] disabled
    [    0.403116] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 30, base_baud = 3000000) is a 8250
    [    1.050740] console [ttyS0] enabled
    [    1.054663] omap8250 48022000.serial: No clock speed specified: using default: 48000000
    [    1.063456] 48022000.serial: ttyS1 at MMIO 0x48022000 (irq = 31, base_baud = 3000000) is a 8250
    [    1.072680] omap8250 48024000.serial: No clock speed specified: using default: 48000000
    [    1.081419] 48024000.serial: ttyS2 at MMIO 0x48024000 (irq = 32, base_baud = 3000000) is a 8250
    [    1.090520] omap8250 481a6000.serial: No clock speed specified: using default: 48000000
    [    1.099257] 481a6000.serial: ttyS3 at MMIO 0x481a6000 (irq = 33, base_baud = 3000000) is a 8250
    [    1.108337] omap8250 481a8000.serial: No clock speed specified: using default: 48000000
    [    1.117060] 481a8000.serial: ttyS4 at MMIO 0x481a8000 (irq = 34, base_baud = 3000000) is a 8250
    [    1.127256] omap_rng 48310000.rng: OMAP Random Number Generator ver. 20
    [    1.135540] m25p80 spi1.0: mr25h40-nonjedec (512 Kbytes)
    [    1.140898] 1 ofpart partitions found on MTD device spi1.0
    [    1.146418] Creating 1 MTD partitions on "spi1.0":
    [    1.151236] 0x000000000000-0x000000080000 : "bootloader"
    [    1.159038] libphy: Fixed MDIO Bus: probed
    [    1.163479] CAN device driver interface
    [    1.168678] c_can_platform 481cc000.can: c_can_platform device registered (regs=fa1cc000, irq=91)
    [    1.178472] c_can_platform 481d0000.can: c_can_platform device registered (regs=fa1d0000, irq=92)
    [    1.252451] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
    [    1.258584] davinci_mdio 4a101000.mdio: detected phy mask fffffffe
    [    1.265163] libphy: 4a101000.mdio: probed
    [    1.269195] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver Micrel KSZ9031 Gigabit PHY
    [    1.279410] cpsw 4a100000.ethernet: Detected MACID = 60:64:05:64:8e:be
    [    1.286083] cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies)
    [    1.294412] i2c /dev entries driver
    [    1.356719] omap-aes 53501000.aes: OMAP AES hw accel rev: 0.1
    [    1.362675] omap-aes 53501000.aes: will run requests pump with realtime priority
    [    1.373899] omap-des 53701000.des: OMAP DES hw accel rev: 0.33
    [    1.379997] omap-des 53701000.des: will run requests pump with realtime priority
    [    1.388489] omap-sham 53100000.sham: hw accel on OMAP rev 0.0
    [    1.395824] GACT probability on
    [    1.399002] Mirror/redirect action on
    [    1.402753] Simple TC action Loaded
    [    1.406947] netem: version 1.3
    [    1.410036] u32 classifier
    [    1.410198] mmc0: new high speed MMC card at address 0001
    [    1.418537]     input device check on
    [    1.422212]     Actions configured
    [    1.422639] mmcblk0: mmc0:0001 MMC04G 3.60 GiB
    [    1.422850] mmcblk0boot0: mmc0:0001 MMC04G partition 1 16.0 MiB
    [    1.423037] mmcblk0boot1: mmc0:0001 MMC04G partition 2 16.0 MiB
    [    1.444748] nf_conntrack version 0.5.0 (8192 buckets, 32768 max)
    [    1.451408] ip_tables: (C) 2000-2006 Netfilter Core Team
    [    1.456838] arp_tables: arp_tables: (C) 2002 David S. Miller
    [    1.462560] Initializing XFRM netlink socket
    [    1.466905] NET: Registered protocol family 17
    [    1.471390] NET: Registered protocol family 15
    [    1.475913] Bridge firewalling registered
    [    1.479943] Ebtables v2.0 registered
    [    1.483586] can: controller area network core (rev 20120528 abi 9)
    [    1.489851] NET: Registered protocol family 29
    [    1.494341] can: raw protocol (rev 20120528)
    [    1.498628] can: broadcast manager protocol (rev 20161123 t)
    [    1.504324] can: netlink gateway (rev 20130117) max_hops=1
    [    1.509978] 8021q: 802.1Q VLAN Support v1.8
    [    1.514257] sctp: Hash tables configured (bind 128/170)
    [    1.519745] Key type dns_resolver registered
    [    1.524409] ThumbEE CPU extension supported.
    [    1.528713] Registering SWP/SWPB emulation handler
    [    1.548370] omap-gpmc 50000000.gpmc: GPMC revision 6.0
    [    1.553561] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000
    [    1.561348] nand: device found, Manufacturer ID: 0x01, Chip ID: 0xda
    [    1.567741] nand: AMD/Spansion S34ML02G1
    [    1.571683] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
    [    1.579320] nand: using OMAP_ECC_BCH8_CODE_HW ECC scheme
    [    1.584716] 8 ofpart partitions found on MTD device omap2-nand.0
    [    1.590746] Creating 8 MTD partitions on "omap2-nand.0":
    [    1.596086] 0x000000000000-0x000000800000 : "nand1.os1"
    [    1.608257] 0x000000800000-0x000001000000 : "nand1.os2"
    [    1.620328] 0x000001000000-0x000001800000 : "nand1.os3"
    [    1.632410] 0x000001800000-0x000002000000 : "nand1.os4"
    [    1.644462] 0x000002000000-0x000005800000 : "nand1.fs1"
    [    1.695746] 0x000005800000-0x000009000000 : "nand1.fs2"
    [    1.747008] 0x000009000000-0x00000c800000 : "nand1.fs3"
    [    1.798273] 0x00000c800000-0x000010000000 : "nand1.fs4"
    [    1.850596] nand: device found, Manufacturer ID: 0x01, Chip ID: 0xda
    [    1.856987] nand: AMD/Spansion S34ML02G1
    [    1.860929] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
    [    1.868562] nand: using OMAP_ECC_BCH8_CODE_HW ECC scheme
    [    1.873957] 8 ofpart partitions found on MTD device omap2-nand.1
    [    1.879987] Creating 8 MTD partitions on "omap2-nand.1":
    [    1.885325] 0x000000000000-0x000000800000 : "nand2.os1"
    [    1.897460] 0x000000800000-0x000001000000 : "nand2.os2"
    [    1.909548] 0x000001000000-0x000001800000 : "nand2.os3"
    [    1.921581] 0x000001800000-0x000002000000 : "nand2.os4"
    [    1.933606] 0x000002000000-0x000005800000 : "nand2.fs1"
    [    1.984862] 0x000005800000-0x000009000000 : "nand2.fs2"
    [    2.036129] 0x000009000000-0x00000c800000 : "nand2.fs3"
    [    2.087400] 0x00000c800000-0x000010000000 : "nand2.fs4"
    [    2.151001] mcp251x spi2.0 can2: MCP2515 successfully initialized.
    [    2.161202] Freeing unused kernel memory: 3072K (c0800000 - c0b00000)
    

  • Hi Robert,

    Thanks for posting the boot log. I don't see the time out message though, I apologize if I am missing it. The log does not look complete since it stops right where the user space initialization starts to happen. I also noticed that the RT kernel is being used, but that should not make a difference either.

    Best Regards,
    Schuyler
  • Hi

    It doesn't have that because it's just before login prompt.
    The message appears after you up the network with "ip link set up can0"

    CLI:
    ip link set can0 type can bitrate 125000 triple-sampling on
    ip link set can1 type can bitrate 125000 triple-sampling on
    ip link set up can0
    ip link set up can1

    Messages:
    net can0: c_can_hw_raminit_wait_syscon: time out
    c_can_platform 481cc000.can can0: setting BTR=1c0b BRPE=0000
    net can1: c_can_hw_raminit_wait_syscon: time out
    c_can_platform 481d0000.can can1: setting BTR=1c0b BRPE=0000

    Regards,
    Robert

  • Hi Robert,
    Another processor class was showing a similar problem. I am reviewing the history to see if the issue was the same and if the solution can be leveraged. The problem seen on the other processor class did not depend on whether the driver was built in or not.
    Best Regards,
    Schuyler
  • Hi

    Thank you for you support.
    Let us know if you find any solution.

    Regards,
    Robert