ESP32 - CSI Camera interface driver

wwwenrico
Posts: 22
Joined: Thu Apr 26, 2018 9:29 am
Location: Italy

ESP32 - CSI Camera interface driver

Postby wwwenrico » Thu May 03, 2018 9:14 pm

Hi,

I can't find the driver of the CSI Camera interface in the ESP32 IDF.

Does the ESP32 chip actually have a hardware CSI Camera interface?
The pins are: D0, D1, D2, D3, D4, D5, D6, D7, PXCLK, HREF, VSINCH

Thanks,
Enrico Migliore

WiFive
Posts: 2115
Joined: Tue Dec 01, 2015 7:35 am

Re: ESP32 - CSI Camera interface driver

Postby WiFive » Thu May 03, 2018 9:17 pm


wwwenrico
Posts: 22
Joined: Thu Apr 26, 2018 9:29 am
Location: Italy

Re: ESP32 - CSI Camera interface driver

Postby wwwenrico » Thu May 03, 2018 10:45 pm

Thank you for the link.

What is the parallel "I2S input interface"?

The I2S interface is meant for digital audio and it's supposed to be a serial interface.

Enrico Migliore

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: ESP32 - CSI Camera interface driver

Postby kolban » Thu May 03, 2018 11:45 pm

Howdy,
I found that chapter 12 of the ESP32 technical reference manual to be useful in this regard:

https://www.espressif.com/sites/default ... ual_en.pdf

Think of "I2S" in ESP32 as being "more" than just the basic I2S protocol (which it can do handily). The I2S subsystem in the ESP32 also provides a high speed bus connected directly to RAM for Direct Memory Access. Putting it simply, you can configure the ESP32 I2S subsystem to send or receive parallel data under hardware control. For example, if a frame from a camera is 16bit pixel sizes and is 320x240 pixels ... that is 320x240x2 bytes = 153KBytes. If the frame rate is 24 frames/second then 1 frame is about 40msecs. It would be impossible (or VERY hard) to read 16 parallel pins 76800 times in 40msecs AND store that in RAM under application logic control. Hence we need a DMA technology that will read lots of data that is synchronized by a high speed clock line and writes it sequentially into RAM. The ESP32 can do this well.

Arguably, this subsystem might have been described as the "DMA subsystem" however its primary purpose was for I2S data and hence got lumped in as the I2S subsystem. But a rose by any other name still smells as sweet.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

wwwenrico
Posts: 22
Joined: Thu Apr 26, 2018 9:29 am
Location: Italy

Re: ESP32 - CSI Camera interface driver

Postby wwwenrico » Fri May 04, 2018 12:49 pm

Hi Kolban,

>> you can configure the ESP32 I2S subsystem to send or receive parallel data under hardware control
Thank you for your explanation.

Enrico Migliore

Return to “ESP32 IDF”

Who is online

Users browsing this forum: Bing [Bot] and 9 guests