Hello,
I am using a PRD function in DSP BIOS to set a timeout for one of the processes in my program. I defined a flag called EDMA_Timeout, that set in interrupt, generated by one-shot PRD called EDMA_Timeout_PRD and the wait for interrupt to happen. the interrupt function is:
void EDMA_Timeout_FXN(void)
{
EDMA_Timeout = TRUE;
}
And th code in program is:
EDMA_Timeout = FALSE;
PRD_start(&EDMA_Timeout_PRD);
while(EDMA3_MemCpy_Interrupt && !EDMA_Timeout);
PRD_stop(&EDMA_Timeout_PRD);
It is executed from time to time in program. The problem is that the program after some time get stuck in while loop, i.e. the interrupt does not occurs.
It usualy occurs that the program completes the transfer before timeout is expired. In this case PRD_stop function stops PRD interrupt before it occurs, and then the PRD activated again in next cycle using PRD_start. Can this cause the PRD to continue counting, or PRD_start causes the counter to be restarted each time?
If this is not the reason for the problem, then what can cause it?
Thanks
Arye Lerner