STM32F7 17 Digital camera interface (DCMI)

  • 44 Replies
  • 730 Views
*

Offline tha

  • *****
  • 5007
    • View Profile
STM32F7 17 Digital camera interface (DCMI)
« on: December 02, 2022, 09:11:38 am »
17 Digital camera interface (DCMI)

17.1 DCMI introduction

The digital camera เป็น a synchronous parallel interface สามารถที่จะรับ a high-speed data flow จาก an external 8-, 10-, 12- or 14-bit CMOS camera module. มันรองรับ different data formats: YCbCr4:2:2/RGB565 progressive video และ compressed data (JPEG).

อินเทอร์เฟซนี้สำหรับใช้กับ black & white cameras, X24 and X5 cameras, และมันถูกทึกทักเอาว่าการประมวลผลล่วงหน้าทั้งหมด เช่น การปรับขนาดถูกดำเนินการใน the camera module.

*

Offline tha

  • *****
  • 5007
    • View Profile
Re: STM32F7 17 Digital camera interface (DCMI)
« Reply #1 on: December 02, 2022, 09:20:01 am »
17.2 DCMI main features

•   8-, 10-, 12- or 14-bit parallel interface
•   Embedded/external line and frame synchronization
•   Continuous or snapshot mode
•   Crop feature
•   Supports the following data formats:
     –   8/10/12/14-bit progressive video: อย่างใดอย่างหนึ่ง monochrome หรือ raw bayer
     –   YCbCr 4:2:2 progressive video
     –   RGB 565 progressive video
     –   Compressed data: JPEG

*

Offline tha

  • *****
  • 5007
    • View Profile
Re: STM32F7 17 Digital camera interface (DCMI)
« Reply #2 on: December 02, 2022, 10:29:34 am »
17.3 DCMI clocks

The digital camera interface ใช้ two clock domains, DCMI_PIXCLK and HCLK. The signals ที่สร้างด้วย DCMI_PIXCLK จะถูกสุ่มบน the rising edge of HCLK ทันทีที่พวกมันเสถียร. An enable signal ถูกสร้างใน the HCLK domain, เพื่อแสดงให้เห็นว่า data ที่มาจาก the camera เสถียรและสามารถถูกสุ่ม. The maximum DCMI_PIXCLK period ต้องสูงกว่า 2.5 HCLK periods.

*

Offline tha

  • *****
  • 5007
    • View Profile
Re: STM32F7 17 Digital camera interface (DCMI)
« Reply #3 on: December 02, 2022, 10:47:52 am »
17.4 DCMI functional overview

The digital camera interface คือ a synchronous parallel interface ที่สามารถรับ high-speed (สูงถึง 54 Mbytes/s) data flows. มันประกอบด้วยมากถึง 14 data lines (D13-D0) และ a pixel clock line (DCMI_PIXCLK). The pixel clock มี a programmable polarity, ดังนั้น data สามารถถูกตรวจจับบนอย่างใดอย่างหนึ่ง the rising or the falling edge ของ the pixel clock.

The data ถูกแพ็คลงใน a 32-bit data register (DCMI_DR) และจากนั้นถูกส่งถ่ายผ่านทาง a general-purpose DMA channel. The image buffer ถูกจัดการโดย the DMA, ไม่โดย the camera interface.

The data ที่รับจาก the camera สามารถถูกจัดเรียงเป็น lines/frames (raw YUB/RGB/Bayer modes) หรือสามารถเป็นลำดับของ JPEG images. เพื่อเปิดใช้งาน JPEG image reception, the JPEG bit (bit 3 of DCMI_CR register) ต้องถูกเซ็ต.

The data flow ถูกซิงโครไนซ์ อย่างใดอย่างหนึ่งโดย hardware โดยใช้ the optional DCMI_HSYNC (horizontal synchronization) and DCMI_VSYNC (vertical synchronization) signals หรือโดย synchronization codes ที่ฝังอยู่ใน the data flow.

*

Offline tha

  • *****
  • 5007
    • View Profile
Re: STM32F7 17 Digital camera interface (DCMI)
« Reply #4 on: December 02, 2022, 10:53:52 am »
17.4.1 DCMI block diagram

Figure 102 แสดง the DCMI block diagram.



*

Offline tha

  • *****
  • 5007
    • View Profile
Re: STM32F7 17 Digital camera interface (DCMI)
« Reply #5 on: December 02, 2022, 01:38:59 pm »
17.4.2 DMA interface

The DMA interface จะแอคทีฟเมื่อ the CAPTURE bit ใน the DCMI_CR register ถูกเซ็ต. A DMA request จะถูกสร้างแต่ละครั้งที่ the camera interface รับ a complete 32-bit data block ใน register ของมัน.

*

Offline tha

  • *****
  • 5007
    • View Profile
Re: STM32F7 17 Digital camera interface (DCMI)
« Reply #6 on: December 02, 2022, 01:50:05 pm »
17.4.3 DCMI physical interface

The interface ถูกประกอบด้วย 11/13/15/17 inputs. เฉพาะ the Slave mode ถูกรองรับ.

The camera interface สามารถตรวจจับ 8-bit, 10-bit, 12-bit or 14-bit data ขึ้นอยู่กับ the EDM[1:0] bits ใน the DCMI_CR register. ถ้าน้อยกว่า 14 bits ถูกใช้, the unused input pins ต้องถูกต่อลงกราวน์.

Table 105 แสดง the DCMI pins.



The data จะซิงโครนัสกับ DCMI_PIXCLK และเปลี่ยนบน the rising/falling edge of the pixel clock ขึ้นอยู่กับ the polarity.

The DCMI_HSYNC signal ระบุ the start/end of a line.

The DCMI_VSYNC signal ระบุ the start/end of a frame



*

Offline tha

  • *****
  • 5007
    • View Profile
Re: STM32F7 17 Digital camera interface (DCMI)
« Reply #7 on: December 03, 2022, 08:00:46 am »
8-bit data

เมื่อ EDM[1:0] ใน DCMI_CR ถูกโปรแกรมเป็น “00” the interface ตรวจจับ 8 LSBs ที่ input (DCMI_D[0:7]) ของมันและเก็บพวกมันเป็น 8-bit data. The DCMI_D[13:8] inputs ถูกเพิกเฉย. ในกรณีนี้, เพื่อตรวจจับ a 32-bit word, the camera interface ใช้ four pixel clock cycles.

The first captured data byte ถูกวางใน the LSB position ใน the 32-bit word และ the 4th captured data byte ถูกวางใน the MSB position ใน the 32-bit word. Table 106 ให้ตัวอย่างของตำแหน่งของ captured data bytes ใน two 32-bit words.