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.

Additional question : Testing CAN application of MCUSW of TDA4_PSDKRA_RTOS(v0.9) in J721EXCP01EVM(Board)

Hi, This is LG member.

The previous questions are replied by .

I have a question and would like to get the explanation against your replies by .

It is a additional question in "Testing CAN application of MCUSW of PSDKRA_RTOS(v0.9) in J721EXCP01EVM(Board)"

Below it is the latest  's answers.

From f2bc02076c31e529882286261a1cb67899ec06f8 Mon Sep 17 00:00:00 2001
From: Karan Saxena <karan@ti.com>
Date: Mon, 23 Sep 2019 13:43:22 +0530
Subject: [PATCH] Add Rx support

"For the first level tests, just copy the message which you were receiving while running the application in Tx mode and use the same message to send to the MCAN in the Rx only case. This is important as the message ID-based filtering happens during the reception of the message and if you send an ID for which the MCU MCAN0 does not have any filter configured - it'll reject it."

After your answer, I asked a question additionally. 

I replied like below :

--------------------------------------------------------------------------------------------------------------------------

After applying above your patch, the error is happened via your patching.

I just modified for the compiling and finished compiling it.

I wasn't able to understand your test method.

Could you explain your test method in details ?  

What i am saying is the CAN communication between EVM Board and CANoe.

I can't receive any response in EVM board because message ID-based filtering.

I don't know how i configure the things, related to ID in CANoe.

-----------------------------------------------------------------------------------------------------------------------------

Perhaps  would remembers below my question. 

Please, need to check this question and explain about these. 

Start : I remind the latest question from me ----------------------------------------------------------------------------------

Hi. This is LG member.

I modified for the above mentioned errors, like below

@@ -162,17 +165,21 @@ sint32 CanApp_ProfileTest(canAppTaskObj_t *testParams)

     uint32              mask = 0x00000000U;
 #endif
     uint32              ctlr_cnt;
+#if defined TX_ONLY
     const Can_PduType   *PduInfo;
     uint8               hth = 0U;
+#endif // modified by TI patch
     Can_ReturnType      status;
-    uint32              loopCnt, itr, totalCanMsgPerSec, totalCpuload;
-    float               totalTimePerMsg;
+    //uint32              loopCnt, itr, totalCanMsgPerSec, totalCpuload;
+       uint32              loopCnt, itr;
+       //float               totalTimePerMsg;
     Utils_PrfLoad       computedLoad;
-    uint64_t            preTimeStamp, postTimeStamp;
-    float               canBusTime;
+    //uint64_t            preTimeStamp, postTimeStamp;
+    //float               canBusTime;

     CanApp_RxPdu = &CanIf_PduInfo;
     /* Message for CAN-FD(MCAN0 module) */
+#if defined TX_ONLY
     PduInfo         = &CanApp_Pdu;
     /* Setting Up CAN FD Extended Frame*/
     CanApp_Pdu.id          = 0xC0 | 0xC0000000U;
@@ -189,7 +196,8 @@ sint32 CanApp_ProfileTest(canAppTaskObj_t *testParams)

     CanApp_DemStatus = E_OK;
     CanApp_DetStatus = E_OK;
-
+#endif // modified by TI patch

....

@@ -282,25 +310,25 @@ sint32 CanApp_ProfileTest(canAppTaskObj_t *testParams)
 #endif

             /* Calculating Can Bus Time in micro sec based on STD or EXT Id */
-            if ((PduInfo->id & 0xC0000000U) == 0xC0000000U)
-            {
+//            if ((PduInfo->id & 0xC0000000U) == 0xC0000000U)
+//            {
                 /* Extended Id */
-                canBusTime = 153.6f;
-            }
-            else
-            {
-                /* Standard Id */
-                canBusTime = 134.5f;
-            }
-            AppUtils_Printf(MSG_NORMAL, MSG_APP_NAME
+//                canBusTime = 153.6f;
+//            }
+//            else
+//            {
+//                /* Standard Id */
+//                canBusTime = 134.5f;
+//            }
+/*            AppUtils_Printf(MSG_NORMAL, MSG_APP_NAME
                         CAN_TX_RX_MSG " %u packets %d times\n",
                         testParams->numTxPackets, testParams->numIterations);
-
+*/
             /* Number of packets transmitted * number of iterations *
                 1 or 2 (2 in case of tx & rx) transmitted in msecs (computed
                 above)
             */
-            AppUtils_Printf(MSG_NORMAL, MSG_APP_NAME
+/*            AppUtils_Printf(MSG_NORMAL, MSG_APP_NAME
                     "Average of %lld.%02d usecs per packet \n",
                     CanProfileCumulativeTx / (testParams->numTxPackets *
                                   testParams->numIterations),
@@ -310,10 +338,10 @@ sint32 CanApp_ProfileTest(canAppTaskObj_t *testParams)
                             ((float)CanProfileCumulativeTx / ((float)testParams->numTxPackets *
                                   (float)testParams->numIterations)));
             totalCanMsgPerSec = (1000000.0f / totalTimePerMsg);
-
+*/
             /* Hardware interrupt handler load + Software interrupt handler +
                 task load */
-            totalCpuload = computedLoad.hwiLoad + computedLoad.swiLoad +
+/*            totalCpuload = computedLoad.hwiLoad + computedLoad.swiLoad +
                             computedLoad.tskLoad;

-
+*/
             /* Set Controller Mode to Stop*/
             status = Can_SetControllerMode(
                 CanConfigSet_CanController_List_PC[ctlr_cnt]->ControllerId,

-------------------------------------- End 

I modified like above. It is these all, modified by me.

And then, I finished compiling your release TDA4_RSDKRA_RTOS_v0.9.0.1 version(MCUSW 00.09.02.01).

If it is not problem, as next step, could you help me to understand the test setup and where I need to modify in order to modify the Rx filter.

END : I remind the latest question from me ----------------------------------------------------------------------------------

I'd like to receive your reply as soon as possible.

If you need to get the detailed content, please refer to "Testing CAN application of MCUSW of PSDKRA_RTOS(v0.9) in J721EXCP01EVM(Board)" issue

Thanks,

Regards,

LG member.

  • I have prepared a summary explaining the can_profile_app main function.

    Please have a look at the following -

    For changing the filter configurations you need to go to the file mcusw/mcuss_demos/mcal_config/Can_Demo_Cfg/output/generated/soc/j721e/mcu1_0/src/Can_Cfg.c

    The following code has the mailbox configuration -

    /* All the Mailbox objects(MB's) will be defined here for all config sets */
         CAN_CONFIG_DATA_SECTION_NON_CONST static Can_MailboxType
         CanConfigSet_CanHardwareObject_0 =
    {
         0U,  /*  CanHandleType 0=Full, 1=Basic */
         1U,  /* CanIdType 0=standard 1=Extended 2=Mixed*/
         0U,  /* HwHandle i.e Mailbox - Hw object in the controller */
         1U,   /* Length of the Mailbox */
         CAN_MAILBOX_DIRECTION_TX,  /* CanObjectType - Direction of Mailbox*/
         &CanConfigSet_PC_CanController_0,  /* Controller */
         NULL_PTR,  /* List of HW Filter structs */
         0U,   /* Hw Filter Count */
         204U,   /* Padding value for CAN FD message */
         (boolean)FALSE,   /* Reserved Param used for future use */ };
         CAN_CONFIG_DATA_SECTION_NON_CONST static Can_MailboxType
         CanConfigSet_CanHardwareObject_1 =
    {
         0U,  /*  CanHandleType 0=Full, 1=Basic */
         1U,  /* CanIdType 0=standard 1=Extended 2=Mixed*/
         0U,  /* HwHandle i.e Mailbox - Hw object in the controller */
         3U,   /* Length of the Mailbox */
         CAN_MAILBOX_DIRECTION_TX,  /* CanObjectType - Direction of Mailbox*/
         &CanConfigSet_PC_CanController_0,  /* Controller */
         NULL_PTR,  /* List of HW Filter structs */
         0U,   /* Hw Filter Count */
         204U,   /* Padding value for CAN FD message */
         (boolean)FALSE,   /* Reserved Param used for future use */ };
         CAN_CONFIG_DATA_SECTION_NON_CONST static Can_MailboxType
         CanConfigSet_CanHardwareObject_2 =
    {
         0U,  /*  CanHandleType 0=Full, 1=Basic */
         1U,  /* CanIdType 0=standard 1=Extended 2=Mixed*/
         0U,  /* HwHandle i.e Mailbox - Hw object in the controller */
         1U,   /* Length of the Mailbox */
         CAN_MAILBOX_DIRECTION_TX,  /* CanObjectType - Direction of Mailbox*/
         &CanConfigSet_PC_CanController_1,  /* Controller */
         NULL_PTR,  /* List of HW Filter structs */
         0U,   /* Hw Filter Count */
         204U,   /* Padding value for CAN FD message */
         (boolean)FALSE,   /* Reserved Param used for future use */ };
             CAN_CONFIG_DATA_SECTION_NON_CONST static Can_MailboxType
         CanConfigSet_CanHardwareObject_3 =
    {
         0U,  /*  CanHandleType 0=Full, 1=Basic */
         0U,  /* CanIdType 0=standard 1=Extended 2=Mixed*/
         0U,  /* HwHandle i.e Mailbox - Hw object in the controller */
         1U,   /* Length of the Mailbox */
         CAN_MAILBOX_DIRECTION_RX,  /* CanObjectType - Direction of Mailbox*/
         &CanConfigSet_PC_CanController_0,  /* Controller */
         CanConfigSet_CanHardwareObject_3_HwFilterConfigList,  /* List of HW Filter structs */
         1U, /* Hw Filter Count */
         0U,   /* Padding value for CAN FD message */
         (boolean)FALSE,   /* Reserved Param used for future use */ };
         CAN_CONFIG_DATA_SECTION_NON_CONST static Can_MailboxType
         CanConfigSet_CanHardwareObject_4 =
    {
         0U,  /*  CanHandleType 0=Full, 1=Basic */
         1U,  /* CanIdType 0=standard 1=Extended 2=Mixed*/
         0U,  /* HwHandle i.e Mailbox - Hw object in the controller */
         1U,   /* Length of the Mailbox */
         CAN_MAILBOX_DIRECTION_RX,  /* CanObjectType - Direction of Mailbox*/
         &CanConfigSet_PC_CanController_1,  /* Controller */
         CanConfigSet_CanHardwareObject_4_HwFilterConfigList,  /* List of HW Filter structs */
         1U, /* Hw Filter Count */
         0U,   /* Padding value for CAN FD message */
         (boolean)FALSE,   /* Reserved Param used for future use */ };
             CAN_CONFIG_DATA_SECTION_NON_CONST static Can_MailboxType
         CanConfigSet_CanHardwareObject_5 =
    {
         0U,  /*  CanHandleType 0=Full, 1=Basic */
         1U,  /* CanIdType 0=standard 1=Extended 2=Mixed*/
         1U,  /* HwHandle i.e Mailbox - Hw object in the controller */
         1U,   /* Length of the Mailbox */
         CAN_MAILBOX_DIRECTION_RX,  /* CanObjectType - Direction of Mailbox*/
         &CanConfigSet_PC_CanController_0,  /* Controller */
         CanConfigSet_CanHardwareObject_5_HwFilterConfigList,  /* List of HW Filter structs */
         1U, /* Hw Filter Count */
         0U,   /* Padding value for CAN FD message */
         (boolean)FALSE,   /* Reserved Param used for future use */ };
         CAN_CONFIG_DATA_SECTION_NON_CONST static Can_MailboxType
         CanConfigSet_CanHardwareObject_6 =
    {
         0U,  /*  CanHandleType 0=Full, 1=Basic */
         0U,  /* CanIdType 0=standard 1=Extended 2=Mixed*/
         0U,  /* HwHandle i.e Mailbox - Hw object in the controller */
         2U,   /* Length of the Mailbox */
         CAN_MAILBOX_DIRECTION_RX,  /* CanObjectType - Direction of Mailbox*/
         &CanConfigSet_PC_CanController_1,  /* Controller */
         CanConfigSet_CanHardwareObject_6_HwFilterConfigList,  /* List of HW Filter structs */
         1U, /* Hw Filter Count */
         0U,   /* Padding value for CAN FD message */
         (boolean)FALSE,   /* Reserved Param used for future use */ 
    };
    

    The following piece of code has the filters - 

    /* HW Filter structure for all configsets */ CAN_CONFIG_DATA_SECTION_NON_CONST static Can_HwFilterType
         CanConfigSet_CanHardwareObject_3_CanHwFilter_0 = {
         177U,  /*CanHwFilterCode*/
         4294967295U,  /*Filter Mask*/
    };
    CAN_CONFIG_DATA_SECTION_NON_CONST static Can_HwFilterType
         CanConfigSet_CanHardwareObject_4_CanHwFilter_0 = {
         176U,  /*CanHwFilterCode*/
         4294967295U,  /*Filter Mask*/
    };
    CAN_CONFIG_DATA_SECTION_NON_CONST static Can_HwFilterType
         CanConfigSet_CanHardwareObject_5_CanHwFilter_0 = {
         192U,  /*CanHwFilterCode*/
         4294967295U,  /*Filter Mask*/
    };
    CAN_CONFIG_DATA_SECTION_NON_CONST static Can_HwFilterType
         CanConfigSet_CanHardwareObject_6_CanHwFilter_0 = {
         193U,  /*CanHwFilterCode*/
         4294967295U,  /*Filter Mask*/
    };

    If you map the filters then for CanConfigSet_PC_CanController_0 you have two filters for Rx - 

    1. CanConfigSet_CanHardwareObject_3_HwFilterConfigList
    2. CanConfigSet_CanHardwareObject_5_HwFilterConfigList

    You can change any of those from 177U or 192U to value of your choice.

    Regards,

    Karan

  • For the setup, we use the PEAK CAN emulator and use the PCAN-view software to send messages. Following is the configuration I am using.

    Regards,

    Karan

  • Hi,

    Thank you for your reply.

    Have you ever checked "CanApp_RxPdu"(Variable which contains Can SDU data)/"CanIf_Mailbox->CanId" in "CanApp_ProfileTest" function ?

    When I printed in CanApp_ProfileTest function(can_profile.c), I saw the result like below :

    CanApp_ProfileTest function(can_profile.c)

    AppUtils_Printf(MSG_NORMAL, MSG_APP_NAME
                "Message Id Received %x Message Length is %u\t \n",
                CanIf_Mailbox->CanId, CanApp_RxPdu->SduDataPtr[3]);

        SemaphoreP_pend(CanIf_RxConfirmationSemaphore,
            SemaphoreP_WAIT_FOREVER);

    Print result ------------------------------------------------------------------------------

    CAN Profile App:Message Id Received e59ff018 Message Length is 0

    ---------------------------------------------------------------------------------------------

    I was able to see some trash value and initial value for Message Id and Msg length.

    It seems like the simulated data is received in EVM board as receiving ACK against the CAN tx data from CANoe

         Time       Chn     ID   Event Type     Dir     DLC   Data length   Data                                                                                                                                                                                              Name  
         0.010000   CAN 2   C0   CAN FD Frame   Tx      15    64            00 AA AA BB BB 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00         
         0.009943   CAN 2   C0   CAN FD Frame   Tx      15    64            00 AA AA BB BB 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00         
         0.010019   CAN 2   C0   CAN FD Frame   Tx      15    64            00 AA AA BB BB 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00         
         0.009984   CAN 2   C0   CAN FD Frame   Tx      15    64            00 AA AA BB BB 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00         
         0.010019   CAN 2   C0   CAN FD Frame   Tx      15    64            00 AA AA BB BB 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00         
         0.009997   CAN 2   C0   CAN FD Frame   Tx      15    64            00 AA AA BB BB 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00         
         0.009982   CAN 2   C0   CAN FD Frame   Tx      15    64            00 AA AA BB BB 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00         
     [+] 0.010019   CAN 2        CAN FD Error   TxErr                       ECC: 110001110xxxxx, Not Acknowledge error, dominant error flag, Bit Position = 561                                                                                                                     
     [+] 0.000166   CAN 2        CAN FD Error   TxErr                       ECC: 110001110xxxxx, Not Acknowledge error, dominant error flag, Bit Position = 561                                                                                                                     
     [+] 0.000166   CAN 2        CAN FD Error   TxErr                       ECC: 110001110xxxxx, Not Acknowledge error, dominant error flag, Bit Position = 561                                                                                                                     

    I am debugging for checking CAN Msg ID and Msg data in app layer after MCAL layer.

    Could you check the CAN Msg ID and Msg data in can profiling app layer after MCAL layer ?

    Regards,

    LG members

  • Hi,

    I am debugging for above issue and found a couple of problems.
    When CANoe transmitted the simulated data  to EVM Board,
    In the middle of Karan Saxena's patch,  this task status was pended within "SemaphoreP_pend" function in the first time.
    That is, this task is stopped in SemaphoreP_pend function in the first time.

    And then, I found one additional thing.
    It seems like "Can_MainFunction_Mode" function need to be called for "SemaphoreP_postFromISR" in CanIf_RxIndication function.
    In this structure, Can_MainFunction_Mode can't be called.

    Could you give me the guide for resolving this ?

    Regards,
    LG member

  • Hi,

    Can you explain to me your setup?

    For running the Rx only application, you should be doing the following -

    1. Disable loopback mode by changing the following - CAN_LOOPBACK_ENABLE change to STD_OFF (mcuss_demos/mcal_config/Can_Demo_Cfg/output/generated/soc/j721e/mcu1_0/include/Can_Cfg.h) - refer to user guide for more details.
    2. Change the APP_INSTANCE_1_INST_IN_CFG_ONLY to STD_ON (mcuss_demos/profiling/can/can_profile.h)
    3. Apply the patch I sent.
    4. Build the binary.
    5. Load the binary to MCU R50 using CCS.
    6. Connect you CAN emulator - one side to the MCU MCAN 0 (J30 on the J7 CP board) and the other side to the host PC
    7. Run the application on the R5.
    8. Start sending packets from the host PC - this packet should have the configuration for which your Rx filter is configured. Right now the filter (as I mentioned in my previous reply is configured for entended ID - 0xC0)

    You can try putting a breakpoint on the - 

    • SemaphoreP_pend(CanIf_RxConfirmationSemaphore, SemaphoreP_WAIT_FOREVER);

    So now when you run and send a message from host this Breakpoint will be reached (this shows that you have received the message on the J7 board)

    You can now look at the memory browser at address - (0x40500210+0x48) you should see the message (This is the address of the 1st Rx buffer)

    You can also look at the CanApp_RxPdu in the memory browser -

     `

    Now check the value at - CanApp_RxPdu.SduDataPtr (0x41C78024)

    I see that the message is being received. Can you please try the above and provide feedback?

    Regards,

    Karan

  • On second thoughts I think that you could possibly still be operating in the loopback mode. Can you please check steps 1 and 2 in the previous reply?

    Also on the print you added - 

    AppUtils_Printf(MSG_NORMAL, MSG_APP_NAME
                "Message Id Received %x Message Length is %u\t \n",
                CanIf_Mailbox->CanId, CanApp_RxPdu->SduDataPtr[3]);

    The CanApp_RxPdu->SduDataPtr[3] is not the length of the data, CanApp_RxPdu->SduDataPtr is the pointer to the data field.

    There could be some problem with printing the CanIf_Mailbox->CanId because I checked with CCS and it looks correct.

    Regards,

    Karan

  • Hi,

    In order to do what you're mentioned above, I need to set the CCS tool.

    However, in the middle of  setting "NewTargetConfiguration.ccxml",

    the error like below is happened in CCS "Test Connection".

    Is there any method for resolving it ?

    ERROR ----------------------------------------------------------------------------------------------------------------------------------

    [Start: Spectrum Digital XDS560V2 STM USB Emulator_0]

    Execute the command:

    %ccs_base%/common/uscif/dbgjtag -f %boarddatafile% -rv -o -F inform,logfile=yes -S pathlength -S integrity

    [Result]


    -----[Print the board config pathname(s)]------------------------------------

    C:\Users\User\AppData\Local\TEXASI~1\CCS\
        ccs901\0\0\BrdDat\testBoard.dat

    -----[Print the reset-command software log-file]-----------------------------

    This utility has selected a 560/2xx-class product.
    This utility will load the program 'sd560v2u.out'.
    Loaded FPGA Image: C:\ti\ccs901\ccs\ccs_base\common\uscif\dtc_top.jbc
    The library build date was 'Jul  5 2019'.
    The library build time was '11:43:29'.
    The library package version is '8.2.2.47'.
    The library component version is '35.35.0.0'.
    The controller does not use a programmable FPGA.

    An error occurred while hard opening the controller.

    -----[An error has occurred and this utility has aborted]--------------------

    This error is generated by TI's USCIF driver or utilities.

    The value is '-180' (0xffffff4c).
    The title is 'SC_ERR_CTL_NO_TRG_POWER'.

    The explanation is:
    The controller has detected a target power loss.
    The user must turn-on or connect the power supply for the target.

    [End: Spectrum Digital XDS560V2 STM USB Emulator_0]

    ----------------------------------------------------------------------------------------------------------------------

    Regards,

    LG members.

  • This CCS tool problem is resolved.

  • Hi,

    You don't really need CCS to run the application, it will be more helpful for a debug purpose. The screenshots I sent were just to validate that the message is being received and the fields are being populated properly.

    Regards,

    Karan

  • Hi,

    I executed your guide, which you said like above.


    the memory browser at address - (0x40500210+0x48) (the 1st Rx buffer)
    --> That is, The result(0x40500258) is 00000000.

    the CanApp_RxPdu in the memory browser
    --> I checked the result. It is "E59FF018". It seems like trash values.

     CanApp_RxPdu.SduDataPtr (0x41C78024) in the memory browser
    --> the result is "41C5385C"

    It seems like the simulated mesage from CANoe is not received correctly.
    Could you check this situation ?

    Regards,
    LG member.

  • Hi,

    Which Rx buffer the message gets stored depends on what ID you are transmitting.

    Can you please share the CAN message you are sending from the host side?

    Also, were you able to run the Tx only test case?

    Regards,

    Karan

  • Hi, 

    I am replying against your reply

    Transmission data, which is simulated from CANoe(in CAN FD mode)

    : ID - C0, 64 bytes, transmit every 10 ms.

    0xAA 0x04 0xCC 0x08 0xEE 0xCC 0x11 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00

    And, I can run the Only TX test case correctly.

    There is one important problem. 

    "Can_0_Int0ISR" - ISR function is not called. 

    It seems like the related Interrupt is not operated well.

    How about this thing ? 

    Isn't there any additional configuration and patch for CAN reception function ?

    Regards, 

    LG members. 

  • Hi,

    The Can_0_Int0ISR is the common ISR for both Tx and Rx, if it doesn't get called in the Rx case but is being called in the Tx case then the CAN on the board is probably not getting the message. 

    A few questions-

    1. While running the Tx only case, were you able to see the messages being sent from the board to the host PC on your CANoe tool?
    2. Was the function Can_0_Int0ISR being called then?

    Can you also confirm that -

    1. You are sending an Extended frame with ID 0xC0 from your host machine.
    2. You are using the MCU MCAN 0 to conned to the CAN tool, MCU MCAN 0 is connector J30 on the board.

    To avoid some confusion can you please just copy the exact message you received on the CANoe tool and use that for sending? If there is a mismatch in the filter configuration and the message you are sending then the CAN will simply reject it.

    So the function Can_0_Int0ISR not being called in Rx case and being called in the Tx case can only be a result of sending a message for which there is no filter set.

    Regards,

    Karan

  • Hi, 

    When I operate the only TX mode, I can see the every correct message, which is sent from the board to the host PC on your CANoe tool.

    I check this below :

    1. You are sending an Extended frame with ID 0xC0 from your host machine.
    2. You are using the MCU MCAN 0 to conned to the CAN tool, MCU MCAN 0 is connector J30 on the board.

    There was one problem. I need to change the Extended frame ID type in CANoe. 

    I are sending an Extended frame with ID 0xC0 from my host machine.

    Transmission data, which is simulated from CANoe(in CAN FD mode)

    : ID - C0, 64 bytes, transmit every 10 ms.

    0xAA 0x04 0xCC 0x08 0xEE 0xCC 0x11 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00

    And then, I checked 1st Rx buffer the in CCS "memory browser"

    I looked at the memory browser at address - (0x40500210+0x48) I saw the message (You said that this is the address of the 1st Rx buffer)

    C00000C0 003F0000 08CC04AA 0011CCEE 00000000 00000000 00000000 00000000
    00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

    It is Ok. 

    And then,  I also look at the CanApp_RxPdu in the memory browser.

    However,  The values like below in CanApp_RxPdu in the memory browser were weird

    0x97016e60 - CanApp_RxPdu(+0x18)

    CanIf_PduInfo
    97016DA8 00000000
    CanProfileCumulativeTx
    00000000 00000000
    parmbuf
    00000000 00000000
    gSciclient_maxMsgSizeBytes
    00000000
    AppUtils_IsCtrEnabled
    00000001

    CanIf_Mailbox

    .............

    -------------------------------

    *I set the breakpoint like below : 

    I try putting a breakpoint before below this function "SemaphoreP_pend"

    • SemaphoreP_pend(CanIf_RxConfirmationSemaphore, SemaphoreP_WAIT_FOREVER);

    --------------------------------

    I check the value at - CanApp_RxPdu.SduDataPtr (0x41C78024)

    CanIf_SDUDataContainer
    00000000 00000000
    00000000 00000000 00000000 00000000 00000000 00000000 00000000
    00000000 00000000 00000000 00000000 00000000 00000000 00000000

    CanApp_RxPdu(including "CanApp_RxPdu.SduDataPtr") were so weird. 

    Could you check this values ?

    If I received the message in 1st Rx buffer correctly, I thought that CanApp_RxPdu(including "CanApp_RxPdu.SduDataPtr")  data must be also received correctly. 

    Can you give me all the source for the CAN app. ?

    And,

    I am building the source as debug mode for MCUSW. And I copied the MCU firmware binary for MCU CAN application(MCUSW_RTOS) to SD card(...lib/firmware/ ...fw.)

    And, MCU cortex R5 0_0 is approaching via CCS. Isn't there any problem due to how to build the source(including the debug mode or release mode) or use the CCS tool ?

    Regards, 

    Alex Jung.

     

  • Hi. This issue is resolved. Thank you for your help. Unnecessary CAN configuration option in my source code was ON