 Hello and welcome to this presentation of the STM32 Digital Camera Interface Controller. It covers all the features of this interface. DCMI stands for Digital Camera Interface. This interface is only available on STM32-L496 for A6 devices. The DCMI is used to connect a parallel camera module to the STM32. The camera generates a parallel data flow together with a pixel clock signal, DCMI, PIX, CLK, which allows the interface to capture the incoming data flow. Two optional signals, Hsync and Vsync, may be used to synchronize the image frame between the camera and the STM32. The DCMI also supports embedded line and frame synchronization code in the data flow. The DCMI is used to perform continuous grabbing. This process starts with an application request and continues until the capture bit is cleared. Alternatively, snapshot mode is used to capture a single frame upon an application request. With the crop feature, the camera interface can cut and store a rectangular portion of the received image. The camera interface has a configurable parallel data interface with 8-14 data lines, together with a pixel clock line, DCMI, PIX, CLK, with a programmable polarity, rising falling edge configuration, and a maximum DCMI, PIX, CLK of 32 MHz. The DCMI pixel clock and advanced high performance bus or AHB clock must respect the minimum AHB, PIX, CLK ratio of 2.5. The DCMI supports color or monochrome cameras using different data formats. Uncoated parallel data, also known as progressive scan, which can be either monochrome or color, raw Bayer. Luminance color coded on 8 bits, 422 progressive scan. RGB 565, red-green-blue information coded on 16 bits. Some cameras also use this parallel interface to transmit compressed images in JPEG format. This is an example of a simple application used to transmit the camera image to the LCD display. The standard way to use the camera interface is to store the received data in a frame buffer in RAM. The STM32 can then process this data or transmit it further through another interface, such as USB or Ethernet. In order to limit the bus contention in the system and avoid missing data, despite the high data rate of this interface, the received data are packed in a FIFO buffer, as shown on the next slide. Depending on the interface size, 8, 10, 12 or 14 bits, two or four data items are stored in a single 32-bit word. Once a complete 32-bit word is available, it is transferred by DMA to the memory. This allows reduction of the bus bandwidth used by the DCMI, even for high-speed cases. The DCMI also has a hardware feature allowing selection of one byte out of two or one byte out of four. This feature is used to convert a color image to black and white and or reduce the image size. In this latter case, in order to keep the form factor of the image, the DCMI may only store every other line, reducing the vertical resolution by a factor of two. An 8-level FIFO is used in order to accommodate for any DMA response latency without losing data. The camera interface allows you to capture a single frame, synchronized on after a software request or to continuously receive the data flow. In capture mode, the capture is requested by setting the capture bit in software and starts with the beginning of the next incoming frame and the DCMI clears the capture bit when the single frame has been received. Cropping is another way to reduce the image size, in addition to reducing the pixel resolution as mentioned previously. This option is valid for both single frame capture and in continuous mode, but it does not support JPEG format. Five interrupts can be generated. All interrupts are maskable by software. The global interrupt is the OR of all single interrupts. The DMA interface is active when capture mode is enabled. A DMA request is generated each time the camera interface receives a complete 32-bit data block in its FIFO. For DMA channels available to DCMI, please refer to the DMA section in the STM32L4 reference manual. The DCMI module is active in run, sleep, low power run and low power sleep modes. In stop 0, stop 1 or stop 2 modes, DCMI operations are not possible, but the contents of its registers are kept. In standby or shutdown modes, the DCMI is powered down and must be re-initialized when returning to a higher power state. This is a list of peripherals related to the DCMI module. Refer to DMA and NVIC trainings for more information about the DCMI channel and interrupt configuration and to the GPIO chapter for setting up the alternate function pins used by the DCMI. Examples of configuration and use of camera interface are available in the STM32QL4 package available at www.st.com. The cameras additionally need to be set up through the I2C bus before the images can be transferred via DCMI. An example of two different camera setups is available in the board support package driver files. Other camera types need different setups that users have to extract from their documentation.