Page 1 of 1

ESP32 CAM, I2S, DMA - questions

Posted: Tue Aug 13, 2019 1:52 pm
by jhinkle
I'm trying to fully understand the CAM demo by igrr - but it seems the demo code does not agree with ESP32 documentation - hence these questions.

From The ESP32 Tech ref manual on DMA - descriptors:

descriptor parameter EOF set to identify the end of the DMA link list (also NEXT = 0)
descriptor parameter SIZE is equal to size of buffer
descriptor parameter LENGTH is size of data to be acquired by this descriptor.

Q1: The tech manual states that if actual data count is less than LENGTH - descriptor is complete and DMA moves to next in link list. Does DMA descriptor return any information as to the actual data count acquired?

igrr's demo code sets every descriptor's EOF to 1 which appears to contradict the information in the tech document. I know the igrr's implementation uses a circular array of descriptors instead of of a fixed link-list size.

Q2: why does igrr's code set each DMA descriptor's EOF to 1?
Q3: If no circular link-list is used but a set of descriptors whose size is the number of camera lines - is only the last descriptor's EOF one?

The tech document on I2S camera processing states that data is passed when HREF is 1 (given the other required are also 1).
I believe the design goal is to process one DMA descriptor for each camera line of data (HREF == 1)

Q4: Since HREF is just a requirement for I2S to pass data to the DMA - what happens if less data is passed than identified in the DMA descriptor's LENGTH parameter?
Q5: Does the DMA descriptor's stay active until enough data from the next camera line is acquired from the next camera line until LENGTH is acquired?
Q6: If NOT -- then what terminates the current DMA descriptor? HREF going to 0?

I'm attempting to acquires non jpeg data from the ov2640 camera which is not addressed in igrr's code which leads me to the questions above.

Thanks for any answers or comments.


Re: ESP32 CAM, I2S, DMA - questions

Posted: Wed Aug 14, 2019 2:27 pm
by jhinkle
Is there anyone at Espressif that can answer my questions since I have been unable to find any Espressif documentation that addresses them?