Hello I'm looking for some assistance with setting up a inter-processor interrupt from the C66x DSP to the A15 ARM on the TMDXIDK5718. I've not been able to find any example applications specific to the Notify module as part of the SDK, and following the IPC Users Guide has not yielded any results. I've attached my source and configuration files for ARM/DSP respectively. Notably the issue I'm encountering is that the DSP appears unresponsive after calling the Notify_sendEvent API.
Thanks in advance for any assistance!
#define EVENT_DSP_NEW_OUTPUT 0u #define LINE_ID_0 0u #define SEM_COUNT_1 1u #define MPU_NAME "HOST" #define DSP1_NAME "DSP1" void InitGB_IPC(void) { Int status; uint16_t proc_id; uint16_t remote_proc_id; UArg cbck_arg; cbck_arg = 0x1010; // placeholder /* * Ipc_start() calls Ipc_attach() to synchronize all remote processors * because 'Ipc.procSync' is set to 'Ipc.ProcSync_ALL' in *.cfg */ do { status = Ipc_start(); } while (status == Ipc_E_NOTREADY); UART_printf("Ipc_start() status: %d\n", status); proc_id = MultiProc_getId(MPU_NAME); remote_proc_id = MultiProc_getId(DSP1_NAME); do { status = Ipc_attach(remote_proc_id); } while ((status < 0) && (status == Ipc_E_NOTREADY)); UART_printf("Ipc_attach() status: %d\n", status); /* register event w/ semaphore */ InitGB_NotifyEvent(¬ify_arm_sem, proc_id, EVENT_DSP_NEW_OUTPUT, (Notify_FnNotifyCbck)PrfrmGB_NotifyDSP_Cbck, cbck_arg); } static void InitGB_NotifyEvent(Semaphore_Handle* sem_handle, uint16_t proc_id, uint32_t event_id, Notify_FnNotifyCbck callback, UArg cbck_arg) { Int status; Semaphore_Params sem_params; Error_Block err_block; /* create semaphore for event *sem_handle = Semaphore_create(SEM_COUNT_1, &sem_params, &err_block);*/ // register notify event status = Notify_registerEvent(proc_id, LINE_ID_0, event_id, (Notify_FnNotifyCbck)callback, cbck_arg); UART_printf("Notify_registerEvent() status: %d\n", status); }
#define MPU_NAME "HOST" #define DSP1_NAME "DSP1" #define EVENT_DSP_NEW_OUTPUT 0u #define LINE_ID_0 0u #define SEM_COUNT_1 1u void InitGB_IPC(void) { Int status; uint16_t proc_id; uint16_t remote_proc_id; UArg cbck_arg; cbck_arg = 0x1010; // placeholder do { status = Ipc_start(); } while (status == Ipc_E_NOTREADY); proc_id = MultiProc_getId(DSP1_NAME); remote_proc_id = MultiProc_getId(MPU_NAME); do { status = Ipc_attach(remote_proc_id); } while ((status < 0) && (status == Ipc_E_NOTREADY)); } void PrfrmGB_NotifyARM(uint32_t event_id, uint32_t payload) { uint16_t proc_id; /* * semaphore post will be invoked by callback * semapohe handle could be derived from event id */ //Semaphore_pend(notify_arm_sem, BIOS_WAIT_FOREVER); proc_id = MultiProc_getId(HOST_NAME); Notify_sendEvent(proc_id, LINE_ID_0, event_id, payload, TRUE); }