Issue with IPCF Initialization on Power Cycle (Dual-Core Setup)
I am using IPCF to share memory between the two cores. For basic validation, I have two functionalities running:
- Core 0: LED Blinking
- Core 2: PWM generation via eMIOS
Both cores are configured to run IPCF correctly. When I run the system in debug mode, everything works as expected — LED blinking and PWM both function properly. However, when I perform a power cycle (turn the board off and on), nothing executes — neither the LED blinks nor the PWM works.
Here’s what I have tried so far:
- Added a delay in Core 2 to avoid any race condition during IPCF initialization.
- Tested the system without IPCF: After removing IPCF, everything works fine, even after a power cycle and in debug mode. This confirms that IPCF is related to the issue.
- Narrowed down the issue to this line:
ipc_shm_init(&ipcf_shm_instances_cfg);
Anything placed after this function call does not execute on a power cycle.
- Tried clearing shared memory before use, suspecting residual data might be causing the problem. However, when I include memory clearing, the system again fails to work after power-up (though it still works in debug mode).
Here’s how I clear the shared memory:
#define IPCF_LOCAL_MEM_ADDR ((void *)0x20480000U)
#define IPCF_REMOTE_MEM_ADDR ((void *)0x20482000U)
#define IPCF_MEM_SIZE (0x2000U)
void clear_ipcf_shared_memory(void)
{
memset(IPCF_LOCAL_MEM_ADDR, 0, IPCF_MEM_SIZE);
memset(IPCF_REMOTE_MEM_ADDR, 0, IPCF_MEM_SIZE);
}
Can you please help me resolve this issue? I have also shared the working project files for reference.
Thanks
Ganesh Bhagwat