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.

AM263P4-Q1: failed MCAN communication using SDK example(mcan_external_read_write)

Part Number: AM263P4-Q1
Other Parts Discussed in Thread: SYSCONFIG, TMDSCNCD263P

Tool/software:

Dear Champs,

My customer is trying to test MCAN using SDK example(mcan_external_read_write) on AM263Px control EVM(CCEVM), and found there was stuck occurred in below 'SemaPhoreP_pend()' function.

When they checked RAM, there is no data in RX buffer, but there is data in TX buffer.

When they checked J5 pin1 and pin3 of CC EVM for MCAN4, there is no signal was observed,

There are no signal observed as below.

Their SW is mcu_plus_sdk_am263px_10_01_00_31, and they build and exceute this example using CCS20.1.1.

Their Sysconfig setting is as below.

Thanks and Best Regards,

SI.

  • Hi Sung-IL,
    MCAN side configurations look correct to me. Could you please attach the PCAN USB settings? There might be a mismatch in sampling point or bit rates between both ends.

    Best Regards,
    Aswathi 

  • Hi Aswathi,

    Thanks for your response.

    They realized to test 'canfd_external_read_write' example, but still faced same issue.

    Instead of PCAN, they are using CANoe and their CANoe setting is as below for CAN-FD.

    Could you please check this?

    Here is their modified configuration for canfd_external_read_write example.

    Thanks and Best Regards,

    SI.

  • Hi Sung-IL,


    Looks like the CANoe side configurations are also correct. Could you please check if the VN tool <--> AM263Px-CC (J5 header) cable connections (CANL, GND, CANH) are as per documentation? Also please tell me what board revision the customer has. Since software side configurations are right, I suspect we are missing something on the CAN transceiver/board end.

    Best Regards,
    Aswathi

  • Hi Aswathi,

    Their board is

    * Board revision

    PCB# : PROC159A

    OPN# : TMDSCNCD263P

    SL# : 27241590157

    And, 

    for VN tool <-> AM263Px-CC cable connection,

    They connected J5 PIN1 and PIN3 to High and Low of CANoe at each to use MCAN4 as below.

    Thanks and Best Regards,

    SI.

  • Hi Sung-IL,
    Have you tried the suggestion shared by Brennan over mail? 

    "Ensure that J21 does not have a jumper populated. When populated, the jumper pulls down the WAKE signal to the TCAN1043A transceiver."

    Best Regards,
    Aswathi

  • Hi Aswathi,

    Sorry for late response.

    Have you tried the suggestion shared by Brennan over mail? 

    "Ensure that J21 does not have a jumper populated. When populated, the jumper pulls down the WAKE signal to the TCAN1043A transceiver."

    Unfortunately it still does not worked even when they tried the suggestion shared by Brennan over mail.

    Could you please share your configuration(HW and SW) and examples you have tested for MCAN  'canfd_external_read_write' example?

    Thanks and Best Regards,

    SI.

  • Hi Sung-IL,
    Apologies for the delay. I do not have the hardware with me right now, but this is my SW configuration:

    PCAN config:

    Example config: No change. Using SDK out of box example.

    I will send you an image of my EVM on Monday to cross check.

    Thanks and Best Regards,
    Aswathi

  • Hi Aswathi,

    Is there any update on this?

    Thanks and Best Regards,

    SI.

  • Hi Sung-IL,

    Sorry for delaying, here is my local setup:

    And this is the PCAN View window after running the "mcan_external_read_write" example from SDK 10.02

    Best Regards,
    Aswathi

  • Aswathi,

    Thanks for this images. Could you please share your source code used in your test?

    And pls let me know your CCS and CGT version used in your test. 

    Thanks and Best Regards,

    SI.

  • As mentioned previously, it is the out of the box "mcan_external_read_write" example from SDK 10.02. But I have also attached the same project as zip.

    mcan_external_read_write_am263px-cc_r5fss0-0_nortos_ti-arm-clang.zip

    CCS: Tested in CCS 12.8.1 and CCS 20.2.0 as well

    CGT: ti-cgt-armllvm_4.0.1.LTS

    Best Regards,
    Aswathi

  • Hi, I just wanted to add:

    I can agree with both sides here. The software works out of the box, but I had the same problems.

    I checked all the signals and voltages on the hardware and measured the Tx signal from the SoC, but there was no CAN data. Tx only went low one time for 1us. I then unplugged the CC board from the dock and soldered wires on the Rx und Tx lines for easier measuring, and then it worked. I removed the wires and put the board back in the dock and it still worked. So I have no idea what was the issue here. (I also removed R3 and R4 in the process, so I can power the CC-board from any USB-C supply, but I don't think this makes a difference here) btw: the state of J21 does not matter.

  • I finally found the problem, at least for my case. Somehow I lost the PMIC config from the examples so VSYS_3V3_LDO2 was not available after initial turn on of the eval board. Without it CAN does not work. So if your board looks like in the picture from , i.e. LD22 is off (also LD21), it is a power supply issue.

  • Hi Aswathi,

    When they tested using your SW, there was no improvement and still no TX signal as below.

    And also, there was LED 'on'(LD21, LD22) which is different from Frank case.

    Could you please let me know how they can debug this?

    CCS: Tested in CCS 20.2.0

    When they debug SW, they found PC is in the while loop below and it seems there was no semaphore released.

    There was LED on in their board as below.

    And, when they tried to run canfd_external_read_write_am263px-cc_r5fss0-0_nortos_ti-arm-clang example,

    they found CANFD read in interrupt mode fail as below.

    Hi Frank,

    Thanks for sharing your case and solution!

    Thanks and Best Regards,

    SI.

  • Hi Sung-IL,


    I thought you were using "mcan_external_read_write" example, not "canfd_external_read_write" that's why I shared the zip for the same.

    mcan external example has no issues in the SDK, but the canfd external example has a minor bug. Please use the patch I have shared on this thread for running "canfd_external_read_write" example: AM263P4-Q1: CAN External read write Tx - Arm-based microcontrollers forum - Arm-based microcontrollers - TI E2E support forums

    Were you not able to run the mcan_external_read_write example I had shared as zip earlier?

    Best Regards,
    Aswathi

  • Hi Aswathi,

    Were you not able to run the mcan_external_read_write example I had shared as zip earlier?

    No. it was not worked.

    When they tested using your SW, there was no improvement and still no TX signal as below.

    The above is the result running the mcan_external_read_write example you shared earlier as I mentioned, and it was not worked.

    Thanks and Best Regards,

    SI.

  • Hi Aswathi,

    I'm still waiting customer's feedback on your patch for 'canfd_external_read_write'.

    In the meantime, could you please guide me how they can debug this? which register or structure element should be checked why TX can not be completed?

    I checking below UG, but could not get details on LEC/DLEC.

    https://software-dl.ti.com/mcu-plus-sdk/esd/AM263PX/latest/exports/docs/api_guide_am263px/DRIVERS_CANFD_HLD_PAGE.html#autotoc_md885

    For example, how how the 'Ack' error can be checked?

    Or is there any other helpful element to check root cause of MCAN communication fail? 

    Thanks and Best Regards,

    SI.

  • Hi Sung-IL,

    The PSR register has the LEC/DLEC fields. The same is translated to the canfd driver using this structure:  "CANFD_MCANProtocolStatus"

    More info on the PSR register can be found in the Register addendum section 5.1.2.27 CFG_PSR Register (https://www.ti.com/lit/ug/spruj57b/spruj57b.pdf?ts=1752836689209)
    Let me check internally with team if there is something else missing with the customer setup. I am unable to pin-point anything specific.

    Thanks and Best Regards,
    Aswathi
  • Hi Aswathi,

    This issue was resolved in customer side. Thanks for your support!

    Thanks and Best Regards,

    SI.