Tools
- CCS 10.1.1
- C2000Ware 3.03.00
- Complier V20.2.1.LTS
- Xdc tool 3.61.02.27
- BIOS 6.83.00.18
Thanks to previous E2E post , ( https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/976857 ) I updated Hwi manager .
Now, I'm studying IPC with TRM & several examples ( ex : driverlib \ f2838x \ examples \ c28x_cm \ ipc ) .
Could you check what I understand , please?
Basically, IPC operates with 3 steps ( send data from CPU1 to CM )
1. Local Core ( CPU1 ) set IPC FLAGs High , one for sending interrupt signal and one for sending command , then Remote Core ( CM ) enable IPC interrupt.
2. CPU1 send data which is divieded into 3 parts : command , start address , data length
3. CM receives command , and starts reading data in shared memory during IPC_ISR0
let's see example code
<CPU1>
IPC_clearFlagLtoR(IPC_CPU1_L_CM_R, IPC_FLAG_ALL); IPC_sync(IPC_CPU1_L_CM_R, IPC_FLAG31); // step 1 for(i=0; i<10; i++) { readData[i] = i; } IPC_sendCommand(IPC_CPU1_L_CM_R, IPC_FLAG0, IPC_ADDR_CORRECTION_ENABLE, IPC_CMD_READ_MEM, (uint32_t)readData, 10); // step 2 IPC_waitForAck(IPC_CPU1_L_CM_R, IPC_FLAG0); if(IPC_getResponse(IPC_CPU1_L_CM_R) == TEST_PASS) { pass = 1; } else { pass = 0; }
<CM>
main.c IPC_clearFlagLtoR(IPC_CM_L_CPU1_R, IPC_FLAG_ALL); IPC_registerInterrupt(IPC_CM_L_CPU1_R, IPC_INT0, IPC_ISR0); // step 1 IPC_sync(IPC_CM_L_CPU1_R, IPC_FLAG31); void IPC_ISR0() { IPC_readCommand(IPC_CM_L_CPU1_R, IPC_FLAG0, IPC_ADDR_CORRECTION_ENABLE, &command, &addr, &data); if(command == IPC_CMD_READ_MEM) { status = true; for(i=0; i<data; i++) { if(*((uint32_t *)addr + i) != i) status = false; } } // step 3 if(status) { IPC_sendResponse(IPC_CM_L_CPU1_R, TEST_PASS); } else { IPC_sendResponse(IPC_CM_L_CPU1_R, TEST_FAIL); } IPC_ackFlagRtoL(IPC_CM_L_CPU1_R, IPC_FLAG0); }
As a result, CM can get data ( 10 bits array : [ 0~ 9 ] ) from CPU1.
Q1 ) where can i check this data in CM? can i see it in expressions session?
Q2 ) I think this process with IPC interrupt doesn't run infinitly like other LED blink examples, Do I understand right?
Q3 ) If I construct this process with SYS/BIOS, I think It's not just adding IPC_ISR0() on .cfg file. How can I write inital setting before BIOS_start()?
I'm sorry I asked you the basics.
Regards,
Donghee Kim.