Tool/software: TI-RTOS
Hi, friends,I 'm developing an application based on IPC messageQ(Transportqmss) and I met some problems.
My development environment is as below:
tmdsevm6678le
CCS8.1.0.00011
bios_6_73_00_12
ipc_3_47_02_00
pdk_c667x_2_0_9
My application consists of a server(core0) and some clients(other cores). And my clients use some code below:
MessageQ_get(msgHandle, &msg, 500);
So there may be some msg arrived after 500us and it remain in the message queue. Thus, next time the client use MessageQ_get() it may got a previous msg .
A solution is judge what msg it is using id, but I prefer not to use id.
Therefore, I want to drain message queue before calling messageq_get().
So I use some code below before current msg may reach:
MessageQ_get(msgHandle, &msg, 0);
But doing this, after my application ran for a while , some core may be hault and the ccs may report some error:
Trouble Halting Target CPU: (Error -1202 @ 0x0) Device core is hung. The debugger will attempt to force the device to a ready state to recover debug control. Your application's state will be corrupt. You should have limited access to memory and registers, but you may need to reset the device to debug further.
Some I think the way I drain the messgae queue is wrong.
Is there anyone know how to drain message queue before waiting for new message?
Thanks for your help!