AM623: RPMsg interrupt.

Part Number: AM623

Tool/software:

Is there any way to create an interrupt function for receiving messages through the RPMsg protocol for the M4 core? Every time the proc sends something, that function starts running.

  • Hello Rafael,

    Are you asking about creating an interrupt function on the M4F side, or on the Linux side?

    I am going to assume you are asking about interrupt functions on the M4F side, and reassign your thread over to another team member more familiar with MCU+ development.

    Just as a heads-up, I am on vacation from tomorrow until July 15. If this thread or any of your other threads get reassigned back to me, feel free to ping the thread several days into the week of the 15th if I haven't responded yet.

    Regards,

    Nick

  • Interrupt on the M4F side. I thought about doing something like this for M4F, but I'm really stuck on finding interrupt functions for RPMsg.

    IRQ i mean RPMsg interrupt for send and request a diag.

  • Hi Rafael,

    Have you looked at the MCU+SDK page for IPC RPMsg, you can find the implementation details and list of all the APIs with their descriptions here - software-dl.ti.com/.../DRIVERS_IPC_RPMESSAGE_PAGE.html

    Let me state my understanding of your use case, please correct me if I am wrong somewhere - you want an interrupt handler function that starts execution as soon as a message (and associated interrupt) is received by the M4F core.

    Regards,

    Nitika

  • Yes! This is the implementation

  • Hi Rafael,

    One more question, is the M4F core receiving messages from Linux or from any other MCU+ core?

    Regards,

    Nitika

  • From Linux! A5 core

  • Hi Rafael,

    Thank you for the information.

    The MCU+SDK example ipc_rpmsg_echo_linux utilizes this implementation for IPC communication involving linux

    The functionality you are looking for is implemented in the RPMsg driver with the ISR function - IpcNotify_isr. It is registered in the driver ipc_notify_v0.c as below:

    HwiP_Params_init(&hwiParams);
    hwiParams.intNum = pInterruptConfig->intNum;
    hwiParams.callback = IpcNotify_isr;
    hwiParams.args = (void*)pInterruptConfig;
    hwiParams.eventId = (uint16_t)pInterruptConfig->eventId;
    hwiParams.isPulse = 0; 

    Inside the ISR, the registered callback function for each core is called. By default, the callback function called is either - RPMessage_RecvCallback or RPMessage_RecvNotifyCallback present in the driver. You can read more about them here - DRV_IPC_RPMESSAGE_MODULE

    You can create your custom callback function in the application to replace the default one as well. To implement that, you need to pass the new callback function in the RPMessage params before RPMessage_construct is called as below:

    RPMessage_CreateParams_init(&createParams);
    createParams.localEndPt = gAckEndPt;
    createParams.recvCallback = custom_rpmsgAckHandler; // custom callback function
    createParams.recvCallbackArgs = &gAckDoneSem;
    status = RPMessage_construct(&gAckMsgObject, &createParams);

    You can find the implementation here - github.com/.../test_ipc_rpmsg.c

    Regards,

    Nitika