Usage of CAN-Applications

  • Dear f&s team,


    I would like to check out the CAN-Bus of the efusA9-Board with the examples bring up with your BSP. So I used "make" to creat the programms and copy them to the board.


    I am also used the programms descripted in the REAME-file, but it does'nt work. With the command "ip -details -statistics link show can0" I got the message "can state ERROR-WARNING (berr-counter tx128 rx0) restart-ms 0" after I used can_tx.


    Have you some tips for the right use of the testprogramms?


    With best regards

  • Hello!


    I have always problems with the usage of the CAN test application.
    I used the strace command to show, how the can_tx application works and got the following output:


    # strace ./can_tx
    execve("./can_tx", ["./can_tx"], [/* 22 vars */]) = 0
    brk(0) = 0x11000
    uname({sys="Linux", node="FSiMX6", ...}) = 0
    mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aac6000
    access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
    open("/etc/ld.so.cache", O_RDONLY) = 3
    fstat64(3, {st_mode=S_IFREG|0644, st_size=39765, ...}) = 0
    mmap2(NULL, 39765, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2aae4000
    close(3) = 0
    open("/lib/libc.so.6", O_RDONLY) = 3
    read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0LV\1\0004\0\0\0"..., 512) = 512
    fstat64(3, {st_mode=S_IFREG|0755, st_size=1181044, ...}) = 0
    mmap2(NULL, 1217748, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2abb7000
    mprotect(0x2acd4000, 28672, PROT_NONE) = 0
    mmap2(0x2acdb000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x11c) = 0x2acdb000
    mmap2(0x2acde000, 9428, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2acde000
    mprotect(0x7ee94000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC|PROT_GROWSDOWN) = 0
    close(3) = 0
    mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ab5f000
    set_tls(0x2ab5f4c0, 0x2ab5fb97, 0x2ab5fb98, 0x2ab5f4c0, 0x2abb6000) = 0
    mprotect(0x2acdb000, 8192, PROT_READ) = 0
    mprotect(0x2abb5000, 4096, PROT_READ) = 0
    munmap(0x2aae4000, 39765) = 0
    socket(0x1d /* PF_??? */, SOCK_RAW, 1) = 3
    --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0} ---
    +++ killed by SIGSEGV +++
    Segmentation fault


    Have everyone an idea, how I can solve the segmentation fault?


    With best regards,


    Till



  • Can we also have the source code of the function in question? Without it is difficult to tell what goes on.


    Your F&S Support Team

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.