Search results

  1. L

    Optimizing GPIO Input Speed

    No, I don't expect you to write the code, but I did expect more than RTFM. Actually what I was expecting is that someone had already solved it. Have a good day. --- sam
  2. L

    Optimizing GPIO Input Speed

    Updated benchmarks: ******** Teensy 4.0 Memory and GPIO Copy 10,000 (32 bit) Word Speed Test ******* Memory to memory copy using c code: Using micros(): Elapsed Time: 18 Microseconds. Time per Copy: 1.80 ns. Transfer Rate: 555.56 MW/s. Using F_CPU_ACTUAL: Elapsed Time: 17.782...
  3. L

    Optimizing GPIO Input Speed

    It sounds like you are knowledgeable about this. So how about some actually help instead of simply RTFM. :) I've tried. You know what attempting to decipher that manual is like. I was hoping someone would have actually implemented this. My apologies if I'm wasting your time. I will go away...
  4. L

    Optimizing GPIO Input Speed

    As a hardware designer (which I used to be in a former life), I would be absolutely ashamed if I was involved in developing a system where DMA was only capable of 10 MHz on a system with even a 150 MHz clock speed. Further, we know (see the benchmarks above) that transfers from GPIO to memory...
  5. L

    Optimizing GPIO Input Speed

    Yes, I'm aware of that. 150 MHz is still 15 times the DMA speed! Just for info. here are my benchmarks for memory-memory and GPIO-memory transfers: ******** Teensy 4.0 Memory and GPIO Copy 10,000 Word Speed Test ******* Memory to memory copy using c code: Elapsed Time: 18 Microseconds...
  6. L

    Optimizing GPIO Input Speed

    Hi: At least someone is taking this seriously enough to hack code. :) One of the example programs is for audio with a sampling rate of only 0.1764 MHz so that isn't directly relevant unless also modified. Another utilizes one of the Timers (TMR4). Unfortunately, all the TMRs are tied in my...
  7. L

    Optimizing GPIO Input Speed

    Just to comment on my comment. It seems utterly amazing that in over 5 years (?), there is no easily accessible example of how to code fast Teensy 4.0 DMA for memory-to-memory copy or GPIO-memory copy! Does anyone care to comment on my comment on my comment? Anyone???? :) --- sam
  8. L

    Optimizing GPIO Input Speed

    Hi: The micros()-Start_Time is for the entire transfer of 1024 32 bit words in this case, just over 100 microseconds, ~100 nm/32 bit word. As to the PIT, someone else suggested the same usage and thus it not applicable by itself at least. So what is the solution? One of the primary benefits...
  9. L

    Optimizing GPIO Input Speed

    Hi, sorry for the delay. Here is a followup. We have DMA functional but is very slow, almost a digitally precise 100 ns/32 bit word. Here is a stripped down version of the code that includes a memory-memory copy of sequential numbers and a GPIO2 to memory copy, which will be whatever is on...
  10. L

    Optimizing GPIO Input Speed

    Hi: I just replaced: dma.transferSize(TRANSFER_SIZE); dma.destinationBuffer(destBuffer, BUFFER_SIZE); with dma.transferCount(TRANSFER_SIZE); dma.destinationBuffer(destBuffer, BUFFER_SIZE * 4); Was that what you meant? It prints: ******** Direct DMA GPIO Test ******* GPIO6...
  11. L

    Optimizing GPIO Input Speed

    Hi again. Sorry for the long delay. We decided to go with DMA, thanks to KurtE for the suggestion. The sketch below is a stripped down version that does everything but the transfers never take place! For this test, it is supposed to DMA 32 words from GPIO6 to the first half of a 64 word...
  12. L

    Optimizing GPIO Input Speed

    Hi: I would like to input from a GPIO location (specifically GPIO6_PSR, 0x42004008) as quickly as possible and transfer the words read to memory (or cache) uninterrupted. Up to 10,000 words or more may be required. Think of data acquisition in a digital storage oscilloscope, though that is not...
Back
Top