DCMI外设配置
DCMI(digital camera memory interface)是STM32内部外设,允许从外部并行相机传感器设备或任何其他支持并行接口的数字视频设备接收视频数据。
这些设备嵌入了摄像头接口,该摄像头接口可以通过8位至14位并行接口与摄像头模块和CMOS传感器连接,以接收视频数据。使用80MHz的像素时钟和14bit数据,相机接口可以实现高达140 Mbyte/s的数据传输速率。
DCMI控制器可以接收RGB565和YUV422格式的原始数据帧以及JPEG压缩数据。
特性:
输入像素时钟和同步信号的极性可编程
并行数据通信可以是8bit,10bit,12bit或14bit
支持8bit逐行视频单色或原始Bayer格式,YC b C r 4:2:2逐行视频,RGB 565逐行视频或压缩数据(如JPEG)
支持连续模式(continuous mode)或快照(单帧)模式(snapshot mode)
自动裁剪图像的能力
Domain | Peripheral | Runtime allocation | Comment | |||
Instance | Cortex-A7 secure (OP-TEE) | Cortex-A7 non-secure (Linux) | Cortex-M4 (STM32Cube) | |||
Visual | DCMI | DCMI | ☐ | ☐ | Assignment (single choice) |
OV5640配置
&i2c5 {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&i2c5_pins_a>;
pinctrl-1 = <&i2c5_pins_sleep_a>;
i2c-scl-rising-time-ns = <100>;
i2c-scl-falling-time-ns = <7>;
status = "okay";
/delete-property/dmas;
/delete-property/dma-names;
ov5640: camera@3c {
compatible = "ovti,ov5640";
reg = <0x3c>;
clocks = <&clk_ext_camera>;
clock-names = "xclk";
DOVDD-supply = <&v2v8>;
powerdown-gpios = <&gpioa 4 GPIO_ACTIVE_HIGH>;
reset-gpios = <&gpioa 3 GPIO_ACTIVE_LOW>;
rotation = <180>;
status = "okay";
port {
ov5640_0: endpoint {
remote-endpoint = <&dcmi_0>;
bus-width = <8>;
data-shift = <2>; /* lines 9:2 are used */
hsync-active = <0>;
vsync-active = <0>;
pclk-sample = <1>;
pclk-max-frequency = <77000000>;
};
};
};
};
&dcmi {
status = "okay";
pinctrl-names = "default", "sleep";
pinctrl-0 = <&dcmi_pins_b>;
pinctrl-1 = <&dcmi_sleep_pins_b>;
port {
dcmi_0: endpoint {
remote-endpoint = <&ov5640_0>;
bus-width = <8>;
hsync-active = <0>;
vsync-active = <0>;
pclk-sample = <1>;
pclk-max-frequency = <77000000>;
};
};
};
作者:SteveChen 创建时间:2024-09-18 17:42
最后编辑:SteveChen 更新时间:2024-09-18 17:43
最后编辑:SteveChen 更新时间:2024-09-18 17:43