AM6421: ipcnotify not working

Part Number: AM6421
Other Parts Discussed in Thread: SYSCONFIG

Hi,

   We are using AM6421 SOC in below configuration and SDK's used as below.

 1) A53 - Linux PROCESSOR-SDK-LINUX-RT-AM64X Version: 11.02.08.02

2) R5F0_0 - INDUSTRIAL-COMMUNICATIONS-SDK-AM64X Version: 11.00.00.13 

3) R5F1_0 : MCU+ SDK  Version: 11.00.00.15

 

  We are using IPCNotify mechanism between R5F0_0 and R5F1_0.

 -  The IPC notify works fine when we use  IpcNotify_sendMsg() Api to send IPCNotify from R5F1_0 to      R5F0_0. Able to go to the registered call back for the notify clientId.

 -  But when we use IpcNotify_sendMsg() Api to send IPCNotify from R5F0_0 to      R5F1_0. Not able            to go to the registered call back for the notify clientId.

   Please suggest how we can slove this issue.

The SDK's used on R5F0_0 and R5F1_0 are given above.

   

 

 

 
  • Hi,

    Please suggest how we can slove this issue.

    Are you calling the IpcNotify_sendMsg() API with correct parameters? Have you registered the callback function using IpcNotify_registerClient () API?

    Regards,

    Tushar

  • Hi Tushar,

               Thank you for the response.

                Yes we are calling the  IpcNotify_sendMsg()  api with correct parameters.

                 and we  have registered the callback function using IpcNotify_registerClient () API.

                   The same works when we use IpcNotify_sendMsg() from MCU+SDK application running on R5F1_0  to 

                   Industrial SDK running on R5F0_0.

                   We are able to use in both ways with MCU+SDK 9 and Industrial SDK 9

  • Hi Narasimha,

    I tried the above at my setup and able to notify from both cores.

    Please refer the project attached below.

    Project - IPC_notify.zip

    Regards,

    Tushar

  • Hi Tushar,

             Can you please confirm if you have used

              Industrial Communication SDK on R5F0_0 : INDUSTRIAL-COMMUNICATIONS-SDK-AM64X Version: 11.00.00.13 

              MCU+SDK on R5F1_0 : MCU+ SDK  Version: 11.00.00.15

           Even we tested with MCU+SDK on both cores and it works.

             But not on in above configuration.

  • Hi Narasimha,

    Industrial Communication SDK on R5F0_0 : INDUSTRIAL-COMMUNICATIONS-SDK-AM64X Version: 11.00.00.13 

              MCU+SDK on R5F1_0 : MCU+ SDK  Version: 11.00.00.15

    Yes, I have tested with the above mentioned configuration.

    You can see the project properties of attached zip to confirm the configurations.

    Regards,

    Tushar

  • Hi Tushar,

                  I have tried the project send by you.

                  I am getting the below error 

    and 

      As per this error it is expecting the CCS 20.4.0 which is not the CCS to be used in the SDK we are using.

     In the SDK we are using it is CCS12.8.1 and TI ARM CLANG 4.0.1 LTS.

    Again we are giving the SDK versions we are using 

     1) A53 - Linux PROCESSOR-SDK-LINUX-RT-AM64X Version: 11.02.08.02     

    2) R5F0_0 - INDUSTRIAL-COMMUNICATIONS-SDK-AM64X Version: 11.00.00.13 

            CCS 12.8.1 

           TI ARM CLANG 4.0.1 LTS

           SysConfig 1.22.0 

    3) R5F1_0 : MCU+ SDK  Version: 11.00.00.15

            CCS 12.8.1 

           TI ARM CLANG 4.0.1 LTS

           SysConfig 1.22.0 

  • Hi Narasimha,

    I have created the above project using latest CCS v20.4.0 and it looks like this is not compatible with older versions of CCS. I will create the project using CCS v12.8.1 and share it on the thread.

    Regards,

    Tushar

  • Hi Tushar,

                 Thank you for the response.

                 We have tried the reference project sent by you. It was working as is.

                But when we modify the project of R5F0_0 core by enabling ethercat feature.The R5F0_0 core project compiles without errors.

                But the R5F1_0 project  without ethercat fails with below error 

    Please suggest how to resolve.

     In brief our requirement is on R5F0_0 we have ethercat protocol running.

     and on R5F1_0 we have another application running without ethercat and ipc should work between the 2 cores.

  • Hi,

    Can you please share the build logs for the R5F1-0 project? There will be error messages in the logs specifying the cause of error.

    Also Have you tried doing IPC between the R5F0-0 and R5F1-0 example both from Industrial SDK?

    Regards,

    Tushar

  • Hi Tushar,

                  Thank you for the response.

              Below is the build log for R5F1_0

    Yes we have  tried doing IPC between the R5F0-0 and R5F1-0 example what is sent by you.

  • Hello Narasimha,

    The Ethercat module which the example is trying to find is in Industrial SDK and not in the MCU+SDK. 

    Please try building the example using MCU+SDK provided as part of Industrial Communication SDK.

    In CCS open the project properties, navigate to Resources -> Linked Resources -> Path Variables

    Update the value of COM_TI_MCU_PLUS_SDK_AM64X_INSTALL_DIR variable with the path of your Indus Comm SDK.

    It should be like ${INDUS_SDK}/mcu_plus_sdk.

    Let us know if this works.

    Regards,

    Tushar

  • Hi Tushar

            Thank you for the support.

              

           Below are  the SDK versions we are using 

     1) A53 - Linux PROCESSOR-SDK-LINUX-RT-AM64X Version: 11.02.08.02     

    2) R5F0_0 - INDUSTRIAL-COMMUNICATIONS-SDK-AM64X Version: 11.00.00.13 

            CCS 12.8.1 

           TI ARM CLANG 4.0.1 LTS

           SysConfig 1.22.0 

    3) R5F1_0 : MCU+ SDK  Version: 11.00.00.15

            CCS 12.8.1 

           TI ARM CLANG 4.0.1 LTS

           SysConfig 1.22.0 

       On R5F0_0 - INDUSTRIAL-COMMUNICATIONS-SDK-AM64X Version: 11.00.00.13 we are using

       ethercat_slave_beckhoff_ssc_demo application.

     

    On R5F1_0 - We are using mcu+sdk based application.

     IPC Notify is enabled on both cores.

      when IPCNotify api is called below are our observations:

     1) R5F0_0 ( ethercat application)  --> R5F1_0(MCU+SDK application) 

          when IPC Notify is used on R5F0_0 we are not getting any ipc  notification callback registered.

    2 )R5F1_0(MCU+SDK application)  --> R5F0_0 ( ethercat application)

       we are getting the IPC Notify call back as registered.

     Please suggest how we can solve this issue.

  • Hi Tushar

            Thank you for the support.

              

           Below are  the SDK versions we are using 

     1) A53 - Linux PROCESSOR-SDK-LINUX-RT-AM64X Version: 11.02.08.02     

    2) R5F0_0 - INDUSTRIAL-COMMUNICATIONS-SDK-AM64X Version: 11.00.00.13 

            CCS 12.8.1 

           TI ARM CLANG 4.0.1 LTS

           SysConfig 1.22.0 

    3) R5F1_0 : MCU+ SDK  Version: 11.00.00.15

            CCS 12.8.1 

           TI ARM CLANG 4.0.1 LTS

           SysConfig 1.22.0 

       On R5F0_0 - INDUSTRIAL-COMMUNICATIONS-SDK-AM64X Version: 11.00.00.13 we are using

       ethercat_slave_beckhoff_ssc_demo application.

     

    On R5F1_0 - We are using mcu+sdk based application.

     IPC Notify is enabled on both cores.

      when IPCNotify api is called below are our observations:

     1) R5F0_0 ( ethercat application)  --> R5F1_0(MCU+SDK application) 

          when IPC Notify is used on R5F0_0 we are not getting any ipc  notification callback registered.

    2 )R5F1_0(MCU+SDK application)  --> R5F0_0 ( ethercat application)

       we are getting the IPC Notify call back as registered.

     Please suggest how we can solve this issue.

    Any Update on the above issue.

  • Hi,

    The assigned expert is out of office, please expect delayed responses.

    Regards,

    Vaibhav

  • Hi Narasimha,

    I have already provided a working project for the same using the above mentioned SDK version. Please compare the difference between projects and let us know.

    Regards,

    Tushar

  • Hi Tushar,

              What is provided by you is with out Ethercat Protocol enabled.

                If we use the same project it is working.

                But when we enable Ethercat protocol in R5F0_0 the IPC Notify from R5F0_0-> R5F1_0 is not working.

                This is our concern.

  • Hi Narasimha,

    What is the interrupt priority for Ethercat and IPC?

    Regards,

    Tushar

  • Hi Tushar,

              We have tried with different interrupt priority for IPC on both the cores.

                But facing the same issue.

                 Not able to receive the IPC Notification sent  from R5f0_0 ( Ethercat Running) to R5f1_0( MCU Application Running)

  • Hi Narasimha,

    Have you tried keeping the IPC interrupt priority more than the ethercat?

    Regards,

    Tushar

  • Hi Tushar,

         Yes

  • Let me try to replicate the behavior at my end. Please allow some time to revert back.

  • Please provide a sample project to replicate the behavior at our end.

  • Hi Tushar,

                  As requested, please find the sample project for your reference for testing the IPCNotify.ReferencePrj.zip

  • Thanks for providing the above project. I have checked the project and it looks like you have excluded the ipc_notify_echo.c file from the build for both the projects.

    The ipc_notify_echo.c file is not being compiled if it is excluded from build process. Also I am not able to build the above project as it has dependency on ethphy_dp83822.h file. Is this taken from SDK or you are using custom header file?

  • Hi Tushar,

              Thanks for the reply.

              Its custom header file Please find attached below.

    ethphy_dp83822.h

            The ipc_notify_echo.c  is excluded because the corresponding calls are in the 

             1)CIPCore_DataSync.c   and

             2) CANCore_DataSync.c.

     

     

  • Hi Narasimha,

    Thanks for sharing the above files with us. Please allow some time to build the project and reproduce the issue to root cause.

    Regards,

    Tushar

  • Hi Narasimha,

    I am still getting build issues. Looks like the symbol tiesc_eeprom is also coming from some file which is missing in the shared project.

    Can you please share all the dependencies for the above project?

    Regards,

    Tushar

  • Hi Tushar,

     Please copy ethercat_slave_beckhoff_ssc_demo folder from examples in industrial sdk installation directory to the workspace.

     and add include the path.

      The required files will be available.

    Thank you

      

  • Hi Narasimha,

    I did checked your application project. I am able to root cause the issue.

    The program is halt at MDIO_phyRegRead() function waiting for command completion.

    Please refer below image.

    I have tried commenting the tiesc_ethphyEnablePowerDown() API and able to get the IPC notification. As the code was stuck at tiesc_ethphyEnablePowerDown() API, your IPC task was never created and executed due to which you are not getting notification on R5F0-0 core.

    Regards,

    Tushar

  • Hi Tushar,

                  Since the test code is for custom board as reuested by you.

                   The PHY we are using DP83822 in our custom Board.

                     We do not have this issue. we are able to communicate to the Ethercat Controller with out any issue.

                      Let me clarify the key issue that we are facing.

                     1. R5F0_0 has EtherCAT stack and R5F1_0 has application.  

                     2. These cores exchange data over shared memory and we are using IPC notify.

                    3. Here is the issue we are facing with IPC.

                          a. R5F0_0 is able to receive IPC notify from R5F1_0 however R5F1_0 is NOT.

                          b. It is not clear if the issue is at R5F0 or RF51. 

                    4. Since the IPC is working one way it is assumed that IPC could be working, there could be issue when used with EtherCAT stack.

            

                   We think the issue could be due to EtherCAT stack in combination with IPC is creating issue. Could you please help check this.

                  Thank You.

        

  • Hi Narasimha,

      a. R5F0_0 is able to receive IPC notify from R5F1_0 however R5F1_0 is NOT.

                          b. It is not clear if the issue is at R5F0 or RF51. 

    Thanks for above clarification. Can you please confirm the IPCNotify_sendMsg API is being called from the R5F0-0 and is returning success in your application?

    Regards,

    Tushar

  • Hi Tushar,

                     Thank you for the response.

                    Yes, we are receiving Success as return value for  IPCNotify_sendMsg API when called from R5F0_0.

                         But the Registered callback in R5F1_0 does not trigger.

  • Hi Tushar,

     Any Update on the reported issue.

    Thank You

  • Hi Narasimha,

    The behavior I am seeing on my setup with your shared application is opposite to your results.

    I am able to send the IPC notification from R5F0-0 core and R5F1-0 core is able to receive this notification successfully. Meanwhile the IPCnotify_sendMsg() API is never getting called from the R5F1-0 core and hence the R5F0-0 core never gets and notification callback.

    I put breakpoints to verify whether the IPC client registration is happening properly or not. The client registration is done for both cores properly. I also put breakpoint on IPCnotify_sendMsg() API to check whether the API is called or not from each core and also put breakpoints on notification callback to assure notification is received on the other core. 

    Meanwhile the IPCnofify_sendMsg() is not getting called for R5F1-0 core.

    Results - 

    1. IPC notification send from R5F0-0, notification received on R5F1-0 core.

    2. IPC notification not sent from R5F1-0 core, and no notification is received on R5F0-0 core.

    Please refer the below video.

    Regards,

    Tushar

  • Hi Tushar,

                   Thank you for the reply.

                   Can we know what the region used for RTOS_NORTOS_IPC_SHM_MEM , DDR_LOG_SHM_MEM and DDR_USER_SHM_MEM in your testing.

                   it should be in DDR region starting from 0xA5000000

                   Can you please send your workspace which you tested for our reference.

  • Hi Tushar,

                    Please find the details where the IPCNotify is called 

                1)R5F0_0 Core

                              in tiesutils.c   - line no's 274 - 299 :  IPC send to R5F1_0

               2) R5F1_0 Core

                           in DataSyncSysInfoTasks.c -line no's 174 -180  - IPC send to R5F0_0

                Please find the work space for your reference.

    0131.ReferencePrj.zip

  • Hi Narasimha,

    I did have put breakpoint in both DataSyncInfoTask.c and tiesutils.c file at IpcNotify_sendMsg() API. But the breakpoint only hit for tiesutils.c file which means the IPC notification is sent from R5F0-0 core and R5F1-0 core received the notification as shown in attached video.

    But for DataSyncInfoTasks.c file the IpcNotify_sendMsg API breakpoint doesn't hit means the notification is never sent from R5F1-0 core.

    Please check your application why the notification from R5F1-0 core never sent to R5F0-0.

    Regards,

    Tushar 

  • HI Tushar,,

                     Please comment the lines on tiesutil.c file line nos  274 -299 i.e IPC send calls.

                 Than you can see   DataSyncInfoTasks.c file the IpcNotify_sendMsg API will be executing on R5F1_0 core.

                      This is what we observed. and tested on our side.

  • Hi Narasimha,

    Thanks for above information. I will check the application with above mentioned changes and update.

    Regards,

    Tushar

  • Hi Narasimha,

    I did commented the above mentioned code and put breakpoint at DataSyncInfoTasks.c file at IpcNotify_sendMsg API and as soon the API completes it's execution on R5F1-0 core a notification is received on the R5F0-0 core. This indicates the IPC is working as expected.

    Please refer video below.

    Regards,

    Tushar

  • HI Tushar,

                     Now please uncomment the lines on tiesutil.c file line nos  274 -299 i.e IPC send calls.

                 Then please check, if IPC Notify is working on both ends.

                 i.e from R5F0_0 to R5F1_0

                     from R5F1_0 to R5F0_0.

                      This is where we are facing the issue.

  • Hi Narasimha,

    In the earlier replies, I had mentioned that the IpcNotify_sendMsg() API is not getting called from R5F 1-0 and hence you are not able to receive the notification on R5F0-0.

    For which you mention to comment IpcNotify_sendMsg calls from R5F0-0 core and we are able to hit the API calls from R5F1-0 and IPC is also happening.

    Below are the observations:

    1. IPC notification send from R5F0-0 works and R5F1-0 receives notification. The vice-versa is not working as the IpcNotify_sendMsg API is not getting called from R5F1-0 core.

    2. As a counter for the above, we commented IPC notify call from R5F0-0 and R5F1-0 now sends notification to R5F0-0 and this is also working.

    Please confirm on your application side that the IpcNotify_sendMsg API is getting called from both the cores(R5F0-0, R5F1-0) and check whether the API is returning success or failure.

    Please send a video capture of the behavior observed for further debugging.

    Regards,

    Tushar

  • Hi Tushar,

     

                         Thanks for the response.

                         Attached are the screen Recordings for your reference.

                        Also, the workspace is attached with debug logs added.

                   We have performed the testing in below steps.

    R5F0_0:

                   In line 216 of file  SHMSysCfgStsDataSyncTasks.c

                                     sts1 = IpcNotify_sendMsg(CSL_CORE_ID_R5FSS1_0, 3, testmsgid, 0); 

                    is where the IPC Notification is sent  to R5F1_0.

                  the screen shot of this is attached for reference, please see “R5F0_0-IPCNOTIFY_Send.png”.

    R5F1_0:

                   The call back for IPC Notify is registered on client ID 3  in line no 255 in file CIPCore_DataSync.c as below.

                     status = IpcNotify_registerClient(SysStatusConfig_IPC_ClientId, &ipcnotify_msghndlr_sysstsconfig, NULL);

                      the screen shot is attached.”R5F1_0_IPCNotifyRegistration.png”.

     

                      Event is sent to IPCMsgProcessTask from callback when IPC Notification is received.

                

    Although IPC Notify sent from R5F0_0 to R5F1_0 on client ID 3 is not received on R5F1_0. This is this issue we are facing and same is provided as screen recording.

                 The screen recording of the status returned is attached “IPCNotify_NotWorkingfromR5F0_0toR5F1_0.mp4”   

               After couple of IPC notify sent from R5F0_0 in a loop every 1 second, R5F1_0 core in not responding. This is inferred as there are no log message displayed.      

    Please review and let us know if we are missing any thing in using IPC Notification.

     

    IPCNotify_NotWorkingfromR5F0_0toR5F1_0.zip

     3326.ReferencePrj.zip

  • Hi Narasimha,

    Thanks for providing the screen record. I did check the video and it looks like you haven't put a breakpoint at IpcNotify_sendMsg() API call as suggested in my earlier replies.

    The whole point of asking video record is to identify that IpcNotify_send API is being called from both cores which I don't see is happening in the video recorded.

    How are you confirming the IpcNotify_sendMsg API is called from both cores without putting a breakpoint?

    Put a breakpoint on files DataSyncSysInfoTasks.ctiescutils.c as shown below.

    Record a video where code hit breakpoints for both the files and share with us. Also check the API call is returning successfully or not.

    Regards,

    Tushar