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.

AM5728: making changes to MessageQ

Part Number: AM5728

hi everyone

i need some help here plz, im trying to create my project so decided to use messageq-linux example but i dont know where to make changes!

so i want to send some data from HOST to DSP, DSP make changes to my data and send it back to host then HOST print the results on console i know its so easy but i couldnt handle it since i have no experiment using IPC an new developing TI

by the way using am5728 evm

i can use any help of you guys, thank you

 

  • Hi, Ebrahim,

    There are info on how IPC works in several documentation.

    In IPC page,
    software-dl.ti.com/.../Foundational_Components_IPC.html

    there are links to

    IPC User’s Guide: It provides details on each components in IPC package
    processors.wiki.ti.com/.../IPC_Users_Guide

    IPC for AM57xx: A broader view of the IPC interworking betwee ARM and DSP/IPU and takes incremental steps toward understanding tasks for IPC
    software-dl.ti.com/.../Foundational_Components_IPC.html

    Running IPC example on DRA7xx/AM572x: lists available examples and what they are
    processors.wiki.ti.com/.../AM572x

    There are a few more links which you will find useful down the road when you want to customize your application.

    Hope these info are helpful to get you start.

    Rex
  • hi rex thanks for your helpfull answer

    i can say figured out how it works, but still dont know if its possible to use msgQ for data passing beetwin HOST and DSP? meaning implementing 2 way communication using msgQ and both HOST and DSP as reader/writer at the same time?

    if yes, plz lead me how to do that

    thanks again

  • Hi, Ebrahim,

    Have you tried to run ex02_messageq example and take a look at it? It should fit your requirement.

    Rex
  • yes Rex i did but it doesnt actually
    in fact i need DSP to write results of a process(ex: integer) and HOST read it
  • Ebrahim,

    The messageq example is roundtrip, so both the DSP and Host read and write messages. Specifically, the DSP sends a message in server_exec() function of Server.c:

    /* send message back */
    queId = MessageQ_getReplyQueue(msg); /* type-cast not needed */
    MessageQ_put(queId, (MessageQ_Msg)msg);

    Please refer to the following wiki page for the full API call flow:

    I hope this helps.

  • hi Sahin thanks for your response

    as mentioned in link below "The server does not open any queues because it extracts the return address from the message header" & " The server returns all messages to the sender. It does not access the message pool."

    if its true, so there is no access to msgQ from DSP side, thus i need to extract the message and there will be complex i can not handle

    processors.wiki.ti.com/.../AM572

  • Hi, Ebrahim,

    In this forum, we try to resolve TI issues in the software and/or hardware. What is not in our support scope is customization based on certain requirements. In that case, we provide guidelines using existing examples. The examples are written in generic form but with all basic functions included to demo the usage of the APIs. They won't be in any particular format to fit every single case. You should understand how the examples work and modify per your requirement. In the URL links both Sahin and I provided, you should be able to find the APIs and use them in your application.

    If you have any other question, please submit a new thread. Thanks!

    Rex
  • Hi Rex

    with hints you guys gived i could do it ,wasnt complicated but time killer to figure!

    Thank you Rex & Sahin

    here is my chenges (Bold ones) for begineers(like myself) to take a look how to do that

    appcommon.h:

    typedef struct {
        MessageQ_MsgHeader  reserved;
        UInt32              cmd;
        UInt32              test;
    } App_Msg;

    app.c:

    /* fill in message payload */
            msg->cmd = App_CMD_NOP;
    msg->test=2;

    &

    /* extract message payload */
    
    
            UInt32 a=0;
            a=msg->test;
            printf(/*/n*/a);

    server.c:
    /* process the message */
            Log_print1(Diags_INFO, "Server_exec: processed cmd=0x%x", msg->cmd);
            if(msg->test==2) msg->test=12;