Hi everyone,
I'm trying to add an openem demo Example_0 into my project.I almost simply added most of the source files to my project and modified the cfg file and platform file accordingly.
I run my two projects on two cores , the two projects are all the same on openem.
core0 hangs in ti_em_init_global :
/* waits for the RP event */
cdEventDscPtr = NULL;
while (cdEventDscPtr == NULL)
cdEventDscPtr = (volatile Emti_CdEventDsc_s*)Emti_popEvent(Emti_svDspMcb.rpQueueIdx);
the return value of popevent keeps to be null.
I checked the return value by running Example_0 and I found its 0x340B8010 which is on the section of PDSP1D.
Also,I traced varibles and I noticed a suspicious difference that in Example_0,the value of qmssGblCfgParams->pdspcmdreg[0] turns to 1588 after executed the line I marked red below.But in my project, pdspcmdreg[0] always keeps to be 0.well the lvPrivateEventPtr is correct(0x340B8000,same as in Example_0) and Emti_svDspMcb.cdQueueIdx is 1588.But pdspcmdreg[0] never change its value.
/****************************************************************
******************** Command (CD) Queue ***********************
****************************************************************/
{
lvRetStatus = ti_em_hw_queue_open(queueNb);
if (lvRetStatus != EM_OK)
return EM_ERR_ALLOC_FAILED;
/* store cd queue idx in DSP SW context */
Emti_svDspMcb.cdQueueIdx = (uint16_t) queueNb++;
Qmss_queueEmpty(Emti_svDspMcb.cdQueueIdx);
/* retrieve private memory region base address */
lvPrivateEventPtr = Emti_getMemoryRegionBaseAddress(Emti_svDspMcb.cfg.private_region_idx);
/* store cd queue idx in PDSP SW context */
*(uint32_t*)(lvPrivateEventPtr) = (uint32_t) Emti_svDspMcb.cdQueueIdx;
/* move to next private descriptor */
lvPrivateEventPtr += TI_EM_PRIVATE_EVENT_DSC_SIZE;
/* Debug Message: */
Emti_logDbg("Command Queue 0x%x \n", Emti_svDspMcb.cdQueueIdx);
}
so I wonder its a problem of pdsp or what? But I set the PDSP exactly as Example_0.
what 's the problem here??
Thank you!