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.

RTOS/AWR1642BOOST: MailBox Project

Part Number: AWR1642BOOST
Other Parts Discussed in Thread: MMWAVE-SDK

Tool/software: TI-RTOS

I want to communicate between ARM and DSP using Mailbox, but when ARM write to mailbox, new message flag not set and DSP cant go through while loop to read message in mailbox.

Code on ARM:

//

// Mailbox initialization
Mailbox_init(MAILBOX_TYPE_MSS);

// Set up mailbox
Mailbox_Config_init(&cfg);
cfg.readMode = MAILBOX_MODE_CALLBACK;
cfg.readCallback = test_callback;

//Open instance to DSS
handleDss = Mailbox_open(MAILBOX_TYPE_DSS, &cfg, &errCode);
if(handleDss == NULL)
{
printf("MSS: Error: unable open MailBox to DSS");
return;
}
if(errCode!=0)
{
printf("MSS: Error: Unable to open the Mailbox Instance. Error=%d\n",errCode);
return;
}
printf("MSS: Mailbox Instance to DSS %p has been opened successfully\n", handleDss);


// Write and send mess to DSS
mess = 2000;
printf("MSS: Mailbox Instance to DSS %p has been opened successfully\n", handleDss);

size = Mailbox_write(handleDss, (uint8_t*)&mess, sizeof(mess));
printf("MSS: received an ACK from DSS \n");
if(size != sizeof(mess))
{
printf("MSS: write Mbx fail");
}

//

Code on DSP:

//

Mailbox_init(MAILBOX_TYPE_DSS);

//Set up Mailbox
Mailbox_Config_init(&cfg);
cfg.readMode = MAILBOX_MODE_CALLBACK;
cfg.readCallback = test_callback;

// Open Mailbox channel
handle = Mailbox_open(MAILBOX_TYPE_MSS, &cfg, &errCode);


if (handle == NULL)
{
System_printf("DSS: Error: Unable to open the Mailbox Instance\n");
return;
}
if (errCode != 0)
{
System_printf("DSS: Error: Unable to open the Mailbox Instance. Error=%d\n",errCode);
return;
}
System_printf("DSS: Mailbox Instance %p has been opened successfully\n", handle);

System_printf("DSS: ************ Waiting for message 1 from MSS ****************\n");

/* wait for call back to set flag */
while (testAppCallbackFlag_dss == 0)
{
Task_sleep(100);
}
System_printf("DSS: Message 1 received.\n");

// read mess
mess_rx = 0;
size = Mailbox_read(handle, (uint8_t*)&mess_rx, sizeof(mess) );
if (size != sizeof(mess))
{
System_printf("DSS: Error read.\n");
}

//

  • Hello minh nguyen van,

    Are you referring to the code in the MMWAVE-SDK with test application for MSS to DSS messsage exchange ?

    Please refer to the test application in  $mmwave_sdk_01_01_00_02\packages\ti\drivers\mailbox\test\xwr16xx\test_mss_dss_msg_exchange in the MMWAVE-SDK . This code is validated for the message exchange between the MSS and DSS.

    Thanks,

    Raghu

    ---------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.

    ----------------------------------------------------------------------------------------------------------