Post Go back to editing

ADSP-SC573 MCAPI questions

I'm using the MCAPI driver to send connectionless messages between the two SHARC cores and the ARM core (but not between the SHARC cores). I'm using the high priority for buffers full of audio data, and the low priority for control messages that have headers that identify the source and destination cores. The code I inherited used a pile of endpoints, for each direction, for each priority, and for each remote core, so the SHARCs have four and the ARM has eight. The way I understand the MCAPI driver, I think I really only need one in each core, but I'm not sure.

Since I'm not making actual connections between endpoints, it seems that when I send a message, it doesn't matter what local endpoint I use to send through, because that information isn't available to the receiving application anyway. All I should have to do is send it from my sole endpoint to the destination core's sole endpoint. The source core is known to the receiver because (in my system) audio only comes from one place, and I incluyde a sender byte into each control message. And the priority is known by the receiver because mcapi_msg_recv_i() asks for a specific priority.

Does that make sense, or is there some reason I need to use multiple endpoints?

Whatever the answers to that, how should I configure MCAPI? What's a named endpoint, versus an anonymous one? Does the max number of endpoints refer to the core or the whole system? Are the maximum message size and number of buffers meaningful only for packet channels, or do I have to specify nonzero values for those even though I'm using connectionless messages in application buffers?

Or is there a document that answers these questions?

  • Hello,

    Hope the below documentation path will be helpful for your requirements.

    Please find the below path for help documentation to know more about MCAPI and their APIs.
    Go to Help -> Help contents in CCES tool then you will find the CrossCore® Embedded Studio <version> > System Run-Time Documentation > Multicore Communications API (MCAPI) Specification.

    You may able to find some examples for MCAPI in Board Support Package for ADSP-SC573.

    To install ADSP-SC5XX Board Support Package,Please visit Software-> Product downloads in the below link

    Please find below CCES Board Support Package examples path.
    Disk:\Analog Devices\ADSP-SC5xx_EZ-KIT_Lite-Rel2.0.2\ADSP-SC5xx_EZ-KIT\Examples\services\mcapi

    For more information regarding audio application interface along with MCAPI,Please find the below EE-377 Application note "Using MCAPI/MDMA for ADSP-SC58x Dual-SHARC Audio Talkthrough" and their associated code link for references.
    Under documentation->Application notes in below link

    Santha kumari.K

  • Actually, no, that's not very helpful. I've read all that stuff. For instance, the MCAPI tab in the System Configuration panel lets you specify a number of named and anonymous endpoints. When I look at the MCAPI help file, which is basically lifted from the MCAPI API Specification from the Multicore Association, gives an example in its Packet Processing section. Its description says, "The example also shows how to use both statically named and dynamic (anonymous) endpoints. It uses the endpoint creation functions mcapi_endpoint_create(), mcapi_create_anonymous_endpoint(), and mcapi_endpoint_get()." But there is no use of a function called mcapi_create_anonymous_endpoint in the example code, and no function of that name is listed anywhere in the API. Nor does the word "anonymous" appear in mcapi.h, except in a comment on an enumerator. So that's still a complete mystery.

    My question about the number of endpoints needed is based on the fact that nothing spells out the limitations on the usage of endpoints. It seems like two endpoints that are used for a packet channel should be reserved for that channel and not used for anything else. But is that true? I'm just guessing. And if I need two packet channels, say between A and B, and between A and C, can the two A's be the same endpoint? So I'm asking here in the hope that someone who's used the ADI MCAPI implementation extensively (or even better, someone who had a hand in creating the ADI implementation) might know the answer from experience, to save me the trouble of a lot of trial and error.

  • Hi

    Thanks for your information


    The instructions for using the MCAPI APIs can be found in the operations manual or ADI help contents (CCES->Help-> Help Contents -> System Run-Time Documentation > Multicore Communications API (MCAPI) Specification).


    A quick example can be found at the ADSP-SC5XX Board Support Package in the path C:\Analog Devices\ADSP-SC5xx_EZ-KIT_Lite-Rel2.0.2\ADSP-SC5xx_EZ-KIT\Examples\services\mcapi\MCAPI_msg\SC573.

    About your question:  It seems like two endpoints that are used for a packet channel should be reserved for that channel and not used for anything else. But is that true? I'm just guessing. And if I need two packet channels, say between A and B, and between A and C, can the two A's be the same endpoint? 

    Generally, 1-to-1 use of local/send endpoint and remote/receive endpoint is recommended referring to the MCAPI Concepts( Channels provide point-to-point FIFO connections between a pair of endpoints ).

    But when you actually use it, you'll see  that:

     1)  When sending the message: channel is 1 to 1 that from the local endpoint( send endpoint) to the remote endpoint (receiving endpoint). mcapi_msg_send() needs a send_endpoint and a receive_endpoint.   

    		MCAPI_IN mcapi_endpoint_t  send_endpoint,
    		MCAPI_IN mcapi_endpoint_t  receive_endpoint,
    		MCAPI_IN void* buffer,
    		MCAPI_IN size_t buffer_size,
    		MCAPI_IN mcapi_priority_t priority,
    		MCAPI_OUT mcapi_status_t* mcapi_status

     2) When receiving the message: the receive endpoint can receive any message from the sending endpoints,  mcapi_msg_recv() just needs a receive_endpoint. 

    		MCAPI_IN mcapi_endpoint_t  receive_endpoint,
    		MCAPI_OUT void* buffer,
    		MCAPI_IN size_t buffer_size,
    		MCAPI_OUT size_t* received_size,
    		MCAPI_OUT mcapi_status_t* mcapi_status

    So as for your concerns, you are right, the two A's can be the same endpoint, that means you can trans messages between A and B,  A and C or B and C. 

    But note: if A is occupied and is receiving messages from B, the message sent from C to A will be pending until A is available. Same in A sending message to B and C at the same time. So in order to improve the transmission efficiency, we usually design the MCAPI Applications likes A to B, C to D, especially in the case of multi-threading (with the Operation System), which will be more efficient.

    Thanks Again, and if you need more examples or some other requirements, please let me know.

    quick email access: 

    Best Regards!


  • sorry to open this thread up again, but leads to a fake website. Do you have an updated one??

Reply Children