Hi,
I am working right now on the shutdown path of an ARM/DSP application, using DM8168-z3 and ezsdk-5_05_01_04.
My DSP (Id 0) cannot detach from the ARM (Id 3), I looked into the API documentation, it says:
If called from the processor with the smaller procId, this function returns Ipc_E_NOTREADY while the processor with the bigger procId has not finished detaching. Once the processor with the bigger procId is finished detaching, this function deletes the instances created for communicating with the specified remote processor.
On the ARM side, I have:
remoteProcId = 0;
status = Ipc_control(remoteProcId, Ipc_CONTROLCMD_STOPCALLBACK, NULL);
vdbg("Ipc stop callback status [%d]", status);
And I achieved (log dump):
SvrCntl_Unlink: Ipc stop callback status [0]
Now, I found out that Ipc_control w/ the STOPCALLBACK argument goes down to Ipc_detach, the returned 0 is saying that it achieved detachment, while on the DSP side I have my while loop:
/* disconnect from remote processor */
do
{
status = Ipc_detach(3);
Log_print1(Diags_USER7, "Ipc_detach[%d]", (IArg)status);
if (status == Ipc_E_NOTREADY)
{
Task_sleep(400);
}
} while (status == Ipc_E_NOTREADY);
With the following dump:
N:DSP P:0 #:00247 M:xdc.runtime.Main S:Ipc_detach[-11]
N:DSP P:0 #:00248 M:xdc.runtime.Main S:Ipc_detach[-11]
N:DSP P:0 #:00249 M:xdc.runtime.Main S:Ipc_detach[-11]
N:DSP P:0 #:00250 M:xdc.runtime.Main S:Ipc_detach[-11]
N:DSP P:0 #:00251 M:xdc.runtime.Main S:Ipc_detach[-11]
N:DSP P:0 #:00252 M:xdc.runtime.Main S:Ipc_detach[-11]
N:DSP P:0 #:00253 M:xdc.runtime.Main S:Ipc_detach[-11]
Endlesly..
So I think I am following the rules of the API, dont know if I am missing something else. Are there any circumstances that make the detchment to go wrong?
Note: Using also IPC Notify and IPC MessageQ, both services closed and unregistered by the time of the detachment.
Regards
-Jose Lopez