HI to all
I have a system that is working in a 2us Loop inside the DSP
This loop is controlled by TMR0 generated in DSP to sync my external CPLD processes.
The CPLD that controls the ADCs issue a INT that triggers the EDMA controller to start memory transfer after ADC conversion.
My problem, is that the INT generated by the CPLD to start EDMA transfer in the DSP, sometimes is delayed by the DSP for a few "ns", depending what I am doing in the code of the DSP.
I believe that if I am accessing the L2 Memory during code execution on the DSP, the EDMA will have to wait to the transfer to finish, delaying the process by a small time.
Does some one suggest any way to guarantee that the time of the ADC transfer is always correct. This problem is relavant to me, because I have chain events that depend to this time accuracy.
I try to swicth the chain events to other INT based EDMA transfer, but since the loop in the DSP is waiting to process the next batch of ADC samples with:
while ((IFR & (1 << EDMA_CHA_EXTINT5)) == 0) { if (++Devices.Adc.Counter > ADC_MAX_WAITING) break; }
The problem also happen.
Another question, is the check of the IFR register be also one problem, by delaying the EDMA controller?
If yes, how can I trigger code execution, based on external int, that does not affect the EDMA controller?
Changing a volatile variable inside one DSP interrupt to trigger the code will generate the same problem, I believe ?
best regards
Nuno Pereira