AnsweredAssumed Answered

mcapi_endpoint_create fails (CCES2.6.0 & SC584)

Question asked by Jhon on Oct 16, 2017
Latest reply on Oct 17, 2017 by Jhon

Hi all:

 

I used the "ThreeCore" example code under "C:\Analog Devices\ADSP-SC5xx_EZ-KIT_Lite-Rel2.0.0\ADSP-SC5xx_EZ-KIT\Examples\services\mcapi", and integrated them into my SC584 application, but it can't work properly.

When trace into the function "mcapi_endpoint_create", CCES triggers an error:

 

A non-recoverable error or exception has occurred.

   Description:  Data Fault Exception - caused by attempting to access invalid data memory.

 

With a deeper trace, I located that, in function "_adi_mcapi_createLocalEndpoint" in "endpoint.c", from lines 382:

382: waitListCopy = pEndpoint->waitList;
387: waitListCopy.pNext->pPrev = &waitListCopy;
388: waitListCopy.pPrev->pNext = &waitListCopy;

when stepping through line 387, the error triggers. By checking the "Expressions" window, I found that, waitListCopy->pNext = 0, and waitListCopy->pPrev = 0, these 2 addresses are not writable, and caused the error.

 

The "endpointID" is 0. Seems no error.

 

By the way, the MCAPI initiate code is:

initialize_comms(PORT_COMMS);

where "PROT_COMMS" is "MCAPI_NUM_RESERVED_PORTS" as in "ThreeCore.h", but not "MCAPI_PORT_ANY" as in the help document. I don't why the ADI guys use "MCAPI_NUM_RESERVED_PORTS", and why my program can't work.

 

Any suggestions?

Thanks in adcance,

Jhon

Outcomes