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.

J721S2XSOMXEVM: CAN interface PIN assignment changing

Part Number: J721S2XSOMXEVM

Hello, 
I have been testing CAN communication with J721S2XSOMXEVM on J721EXCP01EVM board and currently I am using the sdk 8.6 for internal purpose.
I commanded 

Fullscreen
1
2
3
4
5
6
ip link set can0 up type can bitrate 500000
ip link set can1 up type can bitrate 500000
candump can0 &
candump can1 &
cansend can0 345#1122334455667788
cansend can1 345#1122334455667788
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 and then saw what's going on.
What I've observed was every single time I powerr up the board and type the command, the physical connectors for CAN is changed among J30_CP / J31_CP / J27_CP / J10_SOM even I didn't change anything of switch/software.
Please share the potential cause of this.

I appreciate your support in advance.

  • Hello,

    Could you elaborate more about this ?

    the physical connectors for CAN is changed

    What does physical connection changes mean ?

    Is this hardware issue or software issue ? You are using Linux CAN SW for this ?

    Regards

    Tarun Mukesh

  • Hello, 
    Yes, I'm using SDK 8.6 Linux SW and whatever the configuration of peripheral is running by default.
    "ip link set can0 up" is commanded on board side in every power up to check if CAN communication.
    The CAN connector in the board side is connected with the other CAN simulation environment.
    The SDK SW with the J721S2XSOMXEVM on J721EXCP01EVM board is running properly and, there are 5 kinds of CAN connectors on the board.
    But I have observed that the every power cycle, I had to change the CAN connector which is already connected in previous power cycle/runing by the other one. For example, if I connected and checked CAN communication with using J10_SOM connector in previous cycle, now I have to use J30_CP for the can0 which is triggered by "ip link set can0 up"
      

  • Hello,

    I got what you are saying here. As you are using Linux the kernel can provide dynamically "CAN numbers" to the instance for every boot time.

    For example:

    First time :Can0 might be linked to MCU_CAN0 instance 

    Second time:Can0 might be linked to MCAN16 instance and Can1 might be linked to MCU_CAN0 instance.

    For MCU_CAN0 Usage as part of example

    First time: ip link set can0 up

    Second time:ip link set can1 up

    ---

     

    You can verfiy to which instance it got linked using "ls -al /sys/class/net/can*/device" command.It is not physical connectors getting changed internally.

    Based on the command provided above you can run "ip link set can* up" .

    Regards

    Tarun Mukesh

  • Hello, 
    Thank you for giving me the command. Now, I get the result for allocation of canx and it varies every single power cycle, like,

    #1st power cycle
    /sys/class/net/can0/device -> ../../../26a1000.can
    /sys/class/net/can1/device -> ../../../40528000.can
    /sys/class/net/can2/device -> ../../../40568000.can
    /sys/class/net/can3/device -> ../../../2731000.can
    /sys/class/net/can4/device -> ../../../2751000.can

    #2nd power cycle
    /sys/class/net/can0/device -> ../../../40528000.can
    /sys/class/net/can1/device -> ../../../40568000.can
    /sys/class/net/can2/device -> ../../../2731000.can
    /sys/class/net/can3/device -> ../../../2751000.can
    /sys/class/net/can4/device -> ../../../26a1000.can

    Can you please introduce the command the way how I can fix the specific instance of CAN peripheral for can0 ?

    Regards,
    Wooseok Won

  • Hello,

    Actually in dts file of J721S2 Linux SW ,we have already done this 

    aliases {
    serial0 = &wkup_uart0;
    serial1 = &mcu_uart0;
    serial2 = &main_uart8;
    mmc0 = &main_sdhci0;
    mmc1 = &main_sdhci1;
    can0 = &main_mcan16;
    can1 = &mcu_mcan0;
    can2 = &mcu_mcan1;
    can3 = &main_mcan3;
    can4 = &main_mcan5;
    };

    1st power cycle actually matches with this whereas second one didn't match. I am not sure why this happened as the purposes of Aliases is to do this.Can you share me the common proc board dtb file?

    Regards

    Tarun MUkesh 

  • Hello, 
    I'm not able to upload the file, so that I attached the code of k3-j721s2-common-proc-board.dtb

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    d00d feed 0001 4252 0000 0038 0001 26d4
    0000 0028 0000 0011 0000 0010 0000 0000
    0000 1b7e 0001 269c 0000 0000 0000 0000
    0000 0000 0000 0000 0000 0001 0000 0000
    0000 0003 0000 001d 0000 0000 5465 7861
    7320 496e 7374 7275 6d65 6e74 7320 4a37
    3231 5332 2045 564d 0000 0000 0000 0003
    0000 0018 0000 0006 7469 2c6a 3732 3173
    322d 6576 6d00 7469 2c6a 3732 3173 3200
    0000 0003 0000 0004 0000 0011 0000 0001
    0000 0003 0000 0004 0000 0022 0000 0002
    0000 0003 0000 0004 0000 0031 0000 0002
    0000 0001 6368 6f73 656e 0000 0000 0003
    0000 0011 0000 003d 7365 7269 616c 323a
    3131 3532 3030 6e38 0000 0000 0000 0003
    0000 003a 0000 0049 636f 6e73 6f6c 653d
    7474 7953 322c 3131 3532 3030 6e38 2065
    6172 6c79 636f 6e3d 6e73 3136 3535 3061
    2c6d 6d69 6f33 322c 3078 3238 3830 3030
    3000 0000 0000 0002 0000 0001 6370 7573
    0000 0000 0000 0003 0000 0004 0000 0022
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hello,

    sorry i cannot decompile this at my end . I will try to reproduce the issue at my end ,allow me some time.

    Regards

    Tarun Mukesh

  • Please be reminded that it's sdk 8.6. 

  • Hey,

    I have faced same thing as yours.Even after providing "aliases" we are not able to get the same instance number during every reboot. I had a look into the source code and MCAN driver currently is not supporting "aliases" (We don't have functionality written for it internally in the driver). Do you require this functionality ? if so i will raise a request to add the functionality in the driver. Indeed this will take time.

    Regards

    Tarun Mukesh  

  • Thank you for your time! I need this functionality since the board actually to be used for vehicle demonstration and this functionality affects a lot for the event.
    Please update the driver. 

  • Sure, I will raise Internal ticket and will share you those details. 

    Regards 

    Tarun Mukesh 

  • LCPD-36871 is internal ticket

    Regards

    Tarun Mukesh

  • Hello,
    can you please share the status of progress or estimated date for delivery?

  • Hello,

    I shall get the updates and reply here.

    Regards

    Tarun Mukesh

  • Hello,

    It is planned for SDK 9.2 ,might be around next year march.

    Regards

    Tarun Mukesh

  • Hello, 
    It will affect to the technical sales to my customer since it's on next Jan.
    Can you please escalate this issue and reconsider the plan? 

    Regards,
    Wooseok

  • Hello,

    I have raised your concern with the team but sorry to say this, it is not possible to provide by end of the year as the team is completely occupied on earlier reported high priority fixtures same as yours.

    Regards

    Tarun Mukesh

  • Hello, the patch file to be used for building ATF?
    Can you guide me how can I build it or can you provide the output binary?

  • Hello ,

    sorry.Are you asking on how to add the patch and compile ?

    Regards

    Tarun Mukesh

  • Hi, 
    I know how to use the patch file but need to understand how to compile it.
    I have executed linux sdk bin file but have not been compiling it.