This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/TMS320F28377D: IPC flag clear function

Part Number: TMS320F28377D

Tool/software: Code Composer Studio

By using the IPC flag in CPU1 to notice CPU2, we set two IPC flags in one ISR as follow, which is running at 2ms:

#define IPC_FLAG_DATAREQUEST_CPU1 IPC_FLAG26
#define IPC_FLAG_DATAREQUEST_CPU2 IPC_FLAG27

void DataExchange(){
#if defined (CPU1)		
	// CPU1 set IPC flag to each CPU
	IPCLtoRFlagSet(IPC_FLAG_DATAREQUEST_CPU1);
	IPCLtoRFlagSet(IPC_FLAG_DATAREQUEST_CPU2);
#endif
}

And detect IPC flag in each CPU in another ISR, which is running at 125 us:

void CmdCheck(){
#if defined (CPU1)
	DataRequest = IPCLtoRFlagBusy(IPC_FLAG_DATAREQUEST_CPU1);
#elif defined (CPU2)
	DataRequest = IPCRtoLFlagBusy(IPC_FLAG_DATAREQUEST_CPU2);
#endif
if ( DataRequest ) { // reset IPC flag #if defined (CPU1) IPCLtoRFlagClear(IPC_FLAG_DATAREQUEST_CPU1); #elif defined (CPU2) IPCRtoLFlagAcknowledge(IPC_FLAG_DATAREQUEST_CPU2); #endif } }

In normal case, a  indicator in CmdCheck() is triggered only once after setting IPC_FLAG26.

This mechanism works fine sometimes, however, we found that IPC_FLAG26 is not correctly clear every time, which make the indicator is trigger twice continuously after setting IPC_FLAG26.

After looking at One-Day Workshop and F28377 spec, the machanism I've used seems correctly.

In F2837xD examples :ipc_gpio_toggle, I found that each CPU clear it's own flag not only by calling IPCLtoRFlagClear but also IPCRtoLFlagAcknowledge.

Is local CPU clear local flag must using ACK before CLR? But if so, why the mechanism works fine sometimes?

Or is there something I don't notice of?