Hello All,
I am new to DSPLink and DM3730 .I have an application in which arm core running on linux will send data of size 320 bytes to dsp on every 2 ms. DSP core will receive it and do its processing and goes to receive the new data but it send result (Approximately 30 bytes) only after processing 2 messages that means on every 4 ms.
I refer DSPLink message sample application for the same and Message Sample application works well on DM3730 . Later i do some modification on message sample project for our requirement , but didn't do any change in the memory configuration part. The major modifications are
In ARM Side
Initialize 10 queues for putting data
for(queue = 0 ; queue < 10; queue++){
status = MSGQ_alloc (SAMPLE_POOL_ID,APP_BUFFER_SIZE,(MSGQ_Msg *) &msg_send[queue]) ;
if (status == DSP_SOK)
{
MSGQ_setSrcQueue((MSGQ_Msg )msg_send[queue], SampleGppMsgq) ;
printf("Allocation success\n");
}else
{
printf("Allocation failed %d\n",queue);
}
}
Send data
for(queue = 0 ; queue < 10; queue++){
readstatus = Read_afe_spi_data(&msg_send[queue]->sd_data);
loopcount++;
status = MSGQ_put (SampleDspMsgq,(MSGQ_Msg)msg_send[queue]) ;
if (status != DSP_SOK) {
MSGQ_free ((MSGQ_Msg )msg_send[queue]) ;
}
}
Receive data
for(queue = 0; queue < 10 ; queue++){
status = MSGQ_get (SampleGppMsgq, WAIT_FOREVER,(MSGQ_Msg *) &msg_receive[queue]) ;
}
In DSP Side
Allocate message queue
for(queue = 0 ; queue < 10; queue++){
status = MSGQ_alloc (SAMPLE_POOL_ID, (MSGQ_Msg*)&sd_data[queue], APP_BUFFER_SIZE) ;
if (status == SYS_OK)
LOG_printf (&trace, "MSGQ_alloc:Successful.\n") ;
else
LOG_printf (&trace, "MSGQ_alloc: Failed.\n") ;
}
Send Message
for(queue = 0 ; queue < 10; queue++){
status = MSGQ_put (info->locatedMsgq,(MSGQ_Msg)sd_data[queue]) ;
}
Receive Message
for(queue = 0 ; queue < 10; queue++){
status = MSGQ_get (info->localMsgq, (MSGQ_Msg *)&rx_data[queue], SYS_FOREVER);
}
But this application get hangs after some times, I observed that DSP side MSGQ_get function was waiting for the data so the communication hangs. After that i do some modification in the .tcf file
/* ============================================================================
* Generate cdb file...
* ============================================================================
*/
if (config.hasReportedError == false) {
bios.TSK.OBJMEMSEG = prog.get("DDR2");
bios.TSK.STACKSIZE = 60000;
// !GRAPHICAL_CONFIG_TOOL_SCRIPT_INSERT_POINT!
prog.gen();
}
Then the communication works for more time duration but again hangs.How to solve this issue.
Thanks