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.

AWR1843BOOST: Mailbox_write from a callback?

Part Number: AWR1843BOOST

Dear,

I would like to know if Mailbox_write function can be used in a callback, for example, in MCANAppCallback. I am trying to receive a CANFD message from PCAN and send this information to the DSS module. What is the best way to proceed?

thanks in advance,

Samael

  • Hi

    We will check with SW team and will get back to you later this week

    thank you
    Cesar

  • Hi Samael,

    Welcome to the E2E community!

    To answer your question,

    The MCANAppCallback is called by the CANFD driver from ISR context. So, is not recommended to perform any long operations in it.

    The recommended way is to signal a semaphore from the callback, and to use a separate task which pends on this semaphore in an infinite loop and reads from MCAN/writes to mailbox when the semaphore is signaled.

    If the amount of data you need to transfer is large, it might be worth looking into using HSRAM (handshake RAM) for this.

    You can have a look at the older SDK2 mmWave demo for reference as it doesn't abstract away these implementation details like in the newer SDK3 demos. It uses both HSRAM to transfer object data from DSS to MSS, and the semaphore signaling mechanism I mentioned for reading data from mailbox and sending out object data over UART.

    Regards,

    Aayush

  • Thank you, it works perfectly now using a semaphore.

    Best regards,

    Samael