Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 9 of 9

Thread: Interfacing DMA with SPI save camera frames to RAM buffer

Threaded View

  1. #1
    Senior Member
    Join Date
    Oct 2019
    Posts
    161

    Interfacing DMA with SPI to save camera frames to RAM buffer

    I need to process camera frames arriving from an Arducam OV5642 via SPI. If I add both QSPI chips I can get a 16MB buffer which is large enough for to store a RAW format or a JPEG format which can then be uncompressed to a RAW file.

    The default Arducam library code writes to the SD card, but I can modify it to write to a buffer instead. This sort of buffer copying is what DMA is used for. Iíve never used the Teensy DMA features, but Iíve heard of people using DMA features to speed SPI data handling like this. Does this sound similar to anything anyone has implemented?

    Questions:
    1. Does the peripheralís SPI interface have to support DMA to be used like this?
    2. It seems like I might be able to implement DMA by turning it on before a series of repeat SPI reads of predetermined length (ie 640x480) and then disabling it afterward. This way the arriving SPI data will be ferried to the buffer without any control traffic also being transferred into the buffer and corrupting the image. Is this a close guess to how it could work?
    Last edited by kdharbert; 04-16-2021 at 02:24 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •