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.

TMS320F28P650DK: IPC register not working in CPU2

Part Number: TMS320F28P650DK

Hi,

I am trying to send messages from CPU1 to CPU2. Whenever a message is sent from CPU1, an interrupt is thrown in CPU2. In order to receive more messages in CPU2, I need to acknowledge the IPC flag in CPU2. The command I an using in CPU2 to acknowlege IPC flag is as follows:

Cpu2toCpu1IpcRegs.CPU2TOCPU1IPCACK.all |= ipcflag1;
 
However the above line does not serve the purpose and I don't receive the subsequent interrupts.
 
However If I use the line:
IPC_ackFlagRtoL(IPC_CPU2_L_CPU1_R, IPC_FLAG1);
I receive the subsequent interrupts.
 
I want to understand the difference between the two lines.
 
Few Observations on my side:
> In CCS, & Cpu2TOCpu1IpcRegs gives 0x000002
However on using the driverlib API, I see the change is made to the memory location 0x5cE00 which is the actual IPC base address.
 
In the CPU2Menory map file, I see following chunk of code:
Cpu2toCpu1IpcRegsFile 
*          1    00000002    00000026     UNINITIALIZED
                  00000002    00000026     f28p65x_globalvariabledefs.obj (Cpu2toCpu1IpcRegsFile)

.cinit     0    00012000    00000068     
                  00012000    0000000d     (.cinit..data.load) [load image, compression = lzss]
                  0001200d    00000006     (.cinit.READFLAG1CPU2.load) [load image, compression = lzss]
                  00012013    00000006     (.cinit.READFLAG2CPU2.load) [load image, compression = lzss]
                  00012019    00000006     (.cinit.WRITEFLAG1CPU2.load) [load image, compression = lzss]
                  0001201f    00000006     (.cinit.WRITEFLAG2CPU2.load) [load image, compression = lzss]
                  00012025    00000001     --HOLE-- [fill = 0]
                  00012026    00000006     (__TI_handler_table)
                  0001202c    00000004     (.cinit..bss.load) [load image, compression = zero_init]
                  00012030    00000004     (.cinit.Cpu2toCpu1IpcRegsFile.load) [load image, compression = zero_init]
                  00012034    00000004     (.cinit.GETREADIDX.load) [load image, compression = zero_init]
                  00012038    00000004     (.cinit.PUTBUFFER.load) [load image, compression = zero_init]
                  0001203c    00000004     (.cinit.PUTWRITEIDX.load) [load image, compression = zero_init]
                  00012040    00000028     (__TI_cinit_table)


__TI_cinit_table @ 00012040 records: 10, size/record: 4, table size: 40
	.data: load addr=00012000, load size=0000000d bytes, run addr=00010262, run size=00000011 bytes, compression=lzss
	READFLAG1CPU2: load addr=0001200d, load size=00000006 bytes, run addr=0003b180, run size=00000020 bytes, compression=lzss
	READFLAG2CPU2: load addr=00012013, load size=00000006 bytes, run addr=0003b1a0, run size=00000020 bytes, compression=lzss
	WRITEFLAG1CPU2: load addr=00012019, load size=00000006 bytes, run addr=0003b140, run size=00000020 bytes, compression=lzss
	WRITEFLAG2CPU2: load addr=0001201f, load size=00000006 bytes, run addr=0003b160, run size=00000020 bytes, compression=lzss
	.bss: load addr=0001202c, load size=00000004 bytes, run addr=00010000, run size=00000262 bytes, compression=zero_init
	Cpu2toCpu1IpcRegsFile: load addr=00012030, load size=00000004 bytes, run addr=00000002, run size=00000026 bytes, compression=zero_init
	GETREADIDX: load addr=00012034, load size=00000004 bytes, run addr=0003b120, run size=00000020 bytes, compression=zero_init
	PUTBUFFER: load addr=00012038, load size=00000004 bytes, run addr=0003b000, run size=00000100 bytes, compression=zero_init
	PUTWRITEIDX: load addr=0001203c, load size=00000004 bytes, run addr=0003b100, run size=00000020 bytes, compression=zero_init
Let me know if you need any more details.
Thanks,
Mukul
  • Hi Mukul,

    You are correct in your observation that both commands should work, however it seems as though you are using the incorrect notation of the first command. Currently you are using Cpu2toCpu1IpcRegs.CPU2TOCPU1IPCACK which acknowledges the flag set for CPU1. However, because you are using CPU1 to send data to CPU2 and thus CPU2's flag should be acknowledged. The correct command to use would be Cpu1toCpu2IpcRegs.CPU1TOCPU2IPCACK.

    Kind regards,

    AJ Favela