Kinetis SDK v.1.3 API Reference Manual
Rev. 0
Freescale Semiconductor, Inc.
|
This section describes the programming interface of the FlexIO Camera HAL driver.
The FlexIO Camera HAL supports the general 8-bit Camera Parallel Interface (CPI) for camera devices, such as the OV7670.
The FlexIO Camera Interface is simulated from the FlexIO basic HAL driver using one timer, multiple shifters (typically 8 count, such as the data buffer) and ten pins (eight pins for data D[0..7], one pin for PCLK, and one pin for HREF). The HREF pin signal triggers the timer. The PCLK pin signal drives the timer's counter and the shifter. Finally, the data pin signals are shifted into the shifter's chain buffer, where each shifter is connected to one another. Multiple transfers from the buffer to the indicated memory can be supported using the external DMA controller.
Note that the FlexIO Camera driver covers the data bus interface. Additionally, to connect the driver to the camera, the SCCB bus and a VSYNC signal need to be implemented in the application. The SCCB bus is compatible with I2C hardware. The VSYNC signal can be implemented using the GPIO's IRQ, which is more flexible for the application.
This is an example that shows how to use the FlexIO Camera Interface to capture the image data from an OV7670 camera and display it to an LCD module with FlexBus interface. The triggers for Camera DMA and LCD DMA are generated by the buffer full event.