S3C2440-CAMIF接口文档解读

OVERVIEW

CAMIF由7部分组成,patternmux,capturing unit,preview scaler,cedec scaler,preview DMA,codec DMA,SFR(特殊功能存储器)。CAMIF支持ITU-RBT.601/656 YCbCr 8-bit standard.最大输入4096*4096 pixels(2048*2048 pixels for scaling)和两个计数器。Previewscaler 专门用于generate小尺寸图像比如PIP(picture in picture),codec scaler 用于generate codec useful image like type YCbCb4:2:0 or 4:2:2。两个MasterDMAs作为镜像轮流交换从移动环境得到image。这些特性在蜂窝电话的文件类型中很有用,the test pattern generated can be useful in calibration(标准化) of input sync signals as CAMHREF,CAMVSYNC。而且,SYNC视频信号和pixel clock polarity 能够在CMAIF这边用寄存器设置被反转。

SYNC(同步)

FEATURES


SIGNALS DESCRIPTION

BLOCK DIAGRAM

模块示意图


TIMING DIAGRAM


CAMERA INTERFACE OPERATION

TWO DMA PATHS

CAMIF  has 2 DMA paths.P-PATH(preview)C-PATH(codec)在AHB bus上是分开的。就系统总线而言,两种paths是独立的。P-PATH store the RGB image data into memory for PIP。C-PATH stores YCbCr 4:2:0 or 4:2:2 image datainto memory for Codec as MPEGS,H.263.两个主要的paths支持variables applications like DSC(Digital Steel Camera),MPEG4 video conference,video recording。比如,P图像可以用来做为preview image,C图像可用作JPEG image in DSC应用。寄存器设置能够独立地使Ppath&Cpath不工作。



CLOCK DOMAIN时钟域

CAMIF has two clock domains. One is the system bus clock,HCLK. The other is pixel clock,CAMPCLK. 系统时钟必须要比像素时钟快!下图表明了CAMCLKOUT must be divided from the fixed frequency like USB PLLclock.its not necessary for two clock domains to synchronize each other.其他信号比如CAMPCLK should be similarly connected to the Schmitt-triggered level shifter.(施密特触发电平转换器)

 

FRAME MEMORY HIERARCHY帧存储器层次结构

如图所示,帧存储器包括4个乒乓存储for eachof P and C path in 23-6.

Cpath ping-pong memory have three element memories-luminance Y, chrominanceCb, chrominance Cr. If AHB-bus traffic is not enough for the DMA operation tocomplete during One horizontal line period, itmay lead to 故障。



MEMORY STORING METHOD

The little-endian method(低字节/小字节序) in codecpath is used to store in the frame memory. The pixels are stored from LSB toMSB side(最低最高有效位)。AHB bus carries 32-bit word data. So CAMIF makes each of the Y-Cb-Crwords in little-endian style. For P-path, two different formats exist. One pixel (Color 1 pixel) is one word for 24-bit format. Otherwise, two pixels are one word for RGB 16-bit format. Please refer the following figure.


TIMING DIAGRAM FOR REGISTER SETTING寄存器设置的时钟

The first register setting for frame capture command can occur anywhere in the frame period. But its recommended that you set it at the CAMVSYNC ”L” state first and the CAMVSYNC information can be read from the status SFR(next page特殊功能寄存器).All command include ImgCptEn, is valid at CAMVSYNC falling edge. But be careful that except for first SFR setting, all command should be programmed in an ISR (interrupt service routine). Especially, capture operation should be disable when related information for target size are changed.



TIMINGDIAGRAM FOR LAST IRQ

IRQ except LastIRQ is generated beforeimage capturing. Last IRQ which means capture-end can be set by following timingdiagram. LastIRQEn is auto-cleared and ,as mentioned, SFR setting in ISR is fornext frame command. So,for adequate充足 last IRQ, youshould follow next sequence between LastIRQEn and ImgCptEn/ImgCptEn_CoSc/ImgCptEnPrSC. It is recommended that ImgCptEn /ImgCptEn_CoSc/ImgCptEnPrSC are set at same time and at last of SFR setting in ISR. FrameCnt which is read in ISR, means next frame count. On following diagram, last capturedframe count is “1”. That is, Frame 1 is the last-captured frame among frame0~3.FrameCnt is increased by 1 at IRQ rising.


CAMIF SPECIAL REGISTERS

一些特殊的寄存器就不详细列出,详情参见2440Datasheet
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值