DVP 配置
DVP 配置包括以下内容:
驱动配置
DVP驱动依赖MPP中的vin子模块,所以需要提前打开。
- 打开 MPP VIN在 Luban-Lite 根目录下执行
scons --menuconfig
,进入menuconfig的功能配置界面,按如下选择:Local packages options ---> ArtInChip packages options ---> [*] aic-mpp ---> [*] Enable Video Input interface (1843264) Size of Video Input buffer
其中Size of Video Input buffer
需要根据实际的摄像头数据格式来计算。 以YUV422格式、640*480分辨率为例:-
需要申请的Buf大小为:
640*480*2*3 = 1843200
(计算方法详见MPP VIN模块中的 Buf队列管理 ) -
-
在Buf尾部多申请64B,是为了满足Cacheline对齐的技术要求
-
-
- 打开
DVP同上,进入menuconfig的功能配置界面,按如下选择:
Board options ---> [*] Using DVP
- 打开 CameraDVP需要Camera一起配合,整个数据采集通路才是完整的。 Camera外设的一些参数和板级电路相关,需要确认:
-
连接到哪个I2C口
-
Reset pin使用的是哪个IO
-
Powerdown pin使用的是哪个IO
同上,进入menuconfig的功能配置界面完成配置,以连接到I2C2的OV5640为例,按如下选择:Board options ---> [*] Using i2c2 Camera Support ---> [*] Using camera device [*] Using camera OV5640 (2) The No. of I2C channel (PE.14) The reset pin of Camera (PE.15) The power down pin of Camera
-
- 打开
CLK_OUTx
Camera外设需要SoC提供一路clock信号作为运行时的时钟源,D21x和D13x都支持输出4路clock,分别是CLK_OUT0~CLK_OUT3,具体应该用哪一路,取决于板级电路的设计。
所以,请参考板级电路在menuconfig中选择打开一路CLK_OUT:Board options ---> Clocks options ---> [ ] Enable CLK_OUT0 [ ] Enable CLK_OUT1 [ ] Enable CLK_OUT2 [*] Enable CLK_OUT3