Part Number: TMS320F28388D
Hi,
I have set up an IPC message queue between CPU1 and 2 of an F28388D. Surprisingly, I receive some empty messages.
There is a regular event (I have tried at 35kHz and 100Hz, same issue) sending between 1 and 3 messages. Each message is comprised of a data structure of a different size (3 configurations). All messages are sent in the same message queue. On the other end, a regular event (35kHz) checks whether the queue is empty or not, and if not, empties the que.
In most cases, the messages arrive as expected. However, every once in a while, the whole message is empty, ie the "receiving" data structure gets filled with 0s.
code on the receiving side :
inline void getDataCpu1ToCpu2(void)
{
IPCM_error_t _err_ipc;
bool _queue_has_msg = TRUE;
while(_queue_has_msg)
{
_queue_has_msg = IPC_readMessageFromQueue(s_ipc_config_cpu1_cpu2.type, s_ipc_config_cpu1_cpu2.msgqueue, IPC_ADDR_CORRECTION_ENABLE, &IPCM_rx_msg, IPC_NONBLOCKING_CALL);
if ((_queue_has_msg == TRUE) && (IPCM_rx_msg.command == IPCM_CMD_READ_MEM) && (IPCM_rx_msg.dataw2 == ID_MESSAGEQUEUE_1))
{
/* copy data in the proper "receiving" structure */
}
else if ((_queue_has_msg == TRUE) && (IPCM_rx_msg.command == IPCM_CMD_READ_MEM) && (IPCM_rx_msg.dataw2 == ID_MESSAGEQUEUE_2))
{
/* copy data in the proper "receiving" structure */
}
else if ((_queue_has_msg == TRUE) && (IPCM_rx_msg.command == IPCM_CMD_READ_MEM) && (IPCM_rx_msg.dataw2 == ID_MESSAGEQUEUE_3))
{
/* copy data in the proper "receiving" structure */
}
}
}
I have checked on the sending side, the messages sent are consistent.
The receiving data structure is always all-0 or all-OK.
One idea I had (although I have no idea how to check that) is : what happens when there isn't enough room in the circular buffer for the next message ?
Thanks in advance for your help,
Best regards,
Adrien

