Hello,
I am using an LPC55S16 MCU, and I had a question about the expected latency between a PINT or SCT0 DMA trigger and transaction completion. I could not find references to these timings in the datasheet, but perhaps I have overlooked something? I have elaborated on my scenario below.
Configuration:
The behavior I'm trying to achieve is pretty simple; I am trying to trigger a memory transfer from GPIO->PIN[0] to a buffer in RAM. This is done to read digital output of some custom hardware that outputs over 8 bits in parallel.
I want this transfer to be triggered on each rising edge of a 25MHz input clock signal. To achieve this, I have configured SCT0 to trigger a DMA transfer on each rising edge of the input signal. I have the DMA channel configured to burst mode, with a burst power of 0 (i.e. one transaction per burst), to ensure that only one DMA transaction occurs per rising edge. My MCU is configured to operate at the rated maximum clock frequency of 150MHz.
Problem:
When this input signal is driven at lower frequencies (below approx 8MHz), the MCU behaves exactly as desired. The problem arises when I try to increase beyond this. At higher frequencies, I observe that start missing data. It seemed to me as though the MCU is unable to perform triggered DMA transactions at this rate.
To test this theory, I conducted an experiment where I used HW triggered DMA in this exact configuration to toggle a GPIO, instead of using it to read the GPIO port into a RAM buffer. When I did this, it appeared to me that the latency between a hardware trigger and the subsequent transaction completing is around 70-90ns. This is illustrated via the attached photo. The lower signal (TRIGGER SIGNAL) is the input signal, which is driven at 6.25MHz in this experiment, and MCU OUTPUT is the DMA-driven GPIO toggle. I measured a minimum latency of 70ns between the rising edge and the subsequent GPIO toggle.
Is that 70-90ns of latency between SCT0 trigger and DMA completion to be expected, or is there perhaps something that I have configured incorrectly?
Any help or insights you could provide would be greatly appreciated!