Hi Psycho
Assuming I have understood the following correctly:
1. 32Bit work (about 10us) transfer time
2. Repeated once a ms
You may be able to do it with a DMA timer.
- Connect the input lines which interest you to one (single) M52235 port.
- Choose one as trigger (this is the most critical bit)
When the trigger occurs, start the DMA timer, set up to do a port sample every Xns (by DMA to RAM). Possibly it will not be possible to synchronise to the clock but over sampling is possible.
After the programmed number of timer samples has expired (the DMA transfer has completed and the samples are ready in RAM) the end of DMA transfer interrupt can trigger the analysis of
the input samples and extraction on the data word.
Since you have almost 1ms for the analysis this shouldn't be a big issue. The DMA samples ensure high sampling accuracy and no CPU intervention during the 10us sampling period.
The biggest problem is synchronising the start - possibly Msync could come in handy to trigger a high priority interrupt (NMI) to set the DMA timer start. I don't think that this start can be
triggered by hardware, but maybe there is a trick.
We have used this technique (a bit like a logic analyser sampling up to 8 bits on one port) to do something similar - but it was not so fast, so the trigger synchronisation was easy.
Regards
Mark
www.uTasker.comMessage Edited by mjbcswitzerland on
2008-06-24 09:37 PM