This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

OMAP35x ISP CCDC Raw Cmos Sensor Data

Other Parts Discussed in Thread: OMAP3530, SYSCONFIG

Need help in setting up a Camera Cmos Sensor that interfaces to the OMAP35x ISP Camera module.

 

I am attempting to get the ISP CCDC module to take in a 12 bit raw sensor data and write it into memory in Raw Bayer format. The Sensor is programmed to generate a HS (Horizontal Sync) and VS (Vertical Sync). The Sensor will have an XCLK input and is programmed to put the 12 bit Raw data on the falling edge of the PXCLK at 54mhz. ISP will sample the data on the rising edge of the clock.

 

In my application program, I allocated 1224 x 1224 or 1, 498, 1276 (16 word memory space). Note I have setup the ISP and Cmos sensor to transmit 612 x 612 frame. I want to get 2 frames using the Circular Buffer controller in 2 windows mode.

 

I call a function to convert my virtual memory pointer to a physical memory pointer. I pass the physical memory location to the CCDC_SDR_ADDR register. The same pointer is written to CBUFF0_START register. Then I enabel CBUFF0_CTRL and CCDC module and unreset the CMOS sensor.

 

I can see data being written to my allocated memory location in the application layer. The data correlates with the CMOS sensor data.

 

Question 1:  

What is the difference in the address pointers given to the CCDC_SDR_ADDR register and the CBUFF0_START register? I am writing the same pointer to both registers.

 

Question 2:

I am always getting an . IRQ_CBUFF0_INVALID in the CBUFF_IRQSTATUS (IRQ_CBUFF0_INVALID[1]=0x1) register. What could be the cuase of this status error?

 

Question 3:

When I interogate the memroy that the ISP is writing to, I always see a data being written. I was hopping that the data does not get written to the memory until I write a 0x1 to  CBUFF0_CTRL. DONE[2] bit. This way I can make sure the data being processed by the CPU is not being changed by the ISP CCDC module.

 

See the registers that were initialized in the OMAP3530

 

 

 

 

 

 

I have programmed and verified the PAD_CONFIGx registers as such:

0x4800210C CONTROL_PADCONF.CAM_HS[15:0]                 = 0x0108

0x4800210C CONTROL_PADCONF.CAM_VS[31:16]               = 0x0108

0x48002110 CONTROL_PADCONF.CAM_XCLKA[15:0]          = 0x0008

0x48002110 CONTROL_PADCONF.CAM_PCLKA[31:16]        = 0x0108

0x48002114 CONTROL_PADCONF.GLOBL_RESET[15:0]     = 0x000A

0x48002114 CONTROL_PADCONF.CAM_D0[31:16]               = 0x0108

0x48002118 CONTROL_PADCONF.CAM_D1[15:0]                  = 0x0108

0x48002118 CONTROL_PADCONF.CAM_D2[31:16]               = 0x0108

0x4800211C CONTROL_PADCONF.CAM_D3[15:0]                 = 0x0108

0x4800211C CONTROL_PADCONF.CAM_D4[31:16]               = 0x0108

0x48002120 CONTROL_PADCONF.CAM_D5[15:0]                  = 0x0108

0x48002120 CONTROL_PADCONF.CAM_D6[31:16]               = 0x0108

0x48002124 CONTROL_PADCONF.CAM_D7[15:0]                  = 0x0108

0x48002124 CONTROL_PADCONF.CAM_D8[31:16]               = 0x0108

0x48002128 CONTROL_PADCONF.CAM_D9[15:0]                  = 0x0108

0x48002128 CONTROL_PADCONF.CAM_D10[31:16]             = 0x0108

0x4800212C CONTROL_PADCONF.CAM_D11[15:0]               = 0x0108

0x4800212C CONTROL_PADCONF.XCLKB [31:16]     = 0x0008 (Not Used)

 

The rest of the registered are programmed and monitored as indicated below.

 

0x48004810 CM_SYSCONFIG. AUTO_IDLE[0] = 0x1

 

0x48004F00 CM_FCLKEN_CAM. EN_CAM[0] = 0x1                 (CM_FCLKEN_CAM = 0x1)

0x48004F48 CM_CLKSTCTRL_CAM. CLKTRCTRL_CAM[1:0] = 0x2              (CM_CLKSTCTRL_CAM = 0x2)

0x48004F4C CM_CLKSTST_CAM. CLKACTIVITY_CAM[0] = 0x1      (CM_CLKSTST_CAM = 0x1)

0x48306FE0 PM_PWSTCTRL_CAM. POWERSTATE[1:0] = 0x3         (PM_PWSTCTRL_CAM =0x30107)

0x48004F00 CM_FCLKEN_CAM.EN_CSI2[1] = 0x1

0x48004F00 CM_FCLKEN_CAM.EN_CAM[0] = 0x1                  (CM_FCLKEN_CAM = 0x3)

 

0x48004F10 CM_ICLKEN_CAM. EN_CAM[0] = 0x1

 

0x480BD2F8 SBL_SDR_REQ_EXP = 0x401004

0x480BD2F8 SBL_SDR_REQ_EXP.HIST_EXP[9:0] =0x4

0x480BD2F8 SBL_SDR_REQ_EXP. RSZ_EXP [19:10]=0x4

0x480BD2F8 SBL_SDR_REQ_EXP. PRV_EXP [29:20]=0x4

 

 

0x480BC040 ISP_CTRL = 0x3029C100

0x480BC040 ISP_CTRL.FLUSH[31]=0x0

0x480BC040 ISP_CTRL.JPEG_FLUSH[30]=0x0

0x480BC040 ISP_CTRL.CCDC_WEN_POL[29]=0x1 (wen is not used)

0x480BC040 ISP_CTRL.SBL_SHARED_RPORT[28]=0x1

0x480BC040 ISP_CTRL.SBL_AUTOIDLE[21]=0x1

0x480BC040 ISP_CTRL.SBL_WR0_RAM_EN[20]=0x0

0x480BC040 ISP_CTRL.SBL_WR1_RAM_EN[19]=0x1

0x480BC040 ISP_CTRL.SBL_RD_RAM_EN[18]=0x0

0x480BC040 ISP_CTRL.PREV_RAM_EN[17]=0x0

0x480BC040 ISP_CTRL.CCDC_RAM_EN[16]=0x1

0x480BC040 ISP_CTRL.SYNC_DETECT[15:14]=0x3

0x480BC040 ISP_CTRL.RSZ_CLK_EN[13]=0x0

0x480BC040 ISP_CTRL.PRV_CLK_EN[12]=0x0

0x480BC040 ISP_CTRL. HIST_CLK_EN[11]=0x0

0x480BC040 ISP_CTRL.H3A_CLK_EN[10]=0x0

 

0x480BC040 ISP_CTRL.CBUFF_AUTOGATING[9]=0x0

0x480BC040 ISP_CTRL.CCDC_CLK_EN[8] =0x1

0x480BC040 ISP_CTRL.SHIFT[7:6]=0x0

0x480BC040 ISP_CTRL.PAR_CLK_POL[4]=0x0

0x480BC040 ISP_CTRL.PAR_BRIDGE[3:2]= 0x0

0x480BC040 ISP_CTRL.PAR_SER_CLK_SEL[1:0]= 0x0

 

0x480BC030 TCTRL_GRESET_LENGTH. LENGTH[23:0] = 0x84

 

0x480BC034 TCTRL_PSTRB_REPLAY.DELAY[24:0]=0x800

0x480BC034 TCTRL_PSTRB_REPLAY. COUNTER[31:25]= 0x0

 

0x480BC050 TCTRL_CTRL = (Write 0xF8801084) (Read back 0xD8801084)

0x480BC050 TCTRL_CTRL.GRESETDIR[31]=0x1

0x480BC050 TCTRL_CTRL.GRESETPOL[30]=0x1

0x480BC050 TCTRL_CTRL.GRESETEN[29]=0x1

0x480BC050 TCTRL_CTRL.INSEL[28:27]=0x3

0x480BC050 TCTRL_CTRL.STRBPSTRBPOL[26]=0x0

0x480BC050 TCTRL_CTRL.SHUTPOL[24]=0x0

0x480BC050 TCTRL_CTRL.STRBEN[23]=0x1

0x480BC050 TCTRL_CTRL.PSTRBEN[22]=0x0

0x480BC050 TCTRL_CTRL.SHUTEN[21]=0x0

0x480BC050 TCTRL_CTRL.DIVC[18:10]=0x4

0x480BC050 TCTRL_CTRL.DIVB[9:5]=0x4

0x480BC050 TCTRL_CTRL.DIVA[4:0]=0x4

 

0x480BC004 ISP_SYSCONFIG (Write 0x1002) (Read-Back 0x1)(Write 0x1000)(Read-back 0x1000) ( Write 0x1001) (Read-Back 0x1001)

0x480BC004 ISP_SYSCONFIG. MIDLE_MODE[13:12]=0x1

0x480BC004 ISP_SYSCONFIG. SOFT_RESET[1]=0x1

0x480BC004 ISP_SYSCONFIG. AUTO_IDLE[0] =0x0

 

 

0x480BC040 ISP_CTRL = 0x3029C100

0x480BC040 ISP_CTRL.FLUSH[31]=0x0

0x480BC040 ISP_CTRL.JPEG_FLUSH[30]=0x0

0x480BC040 ISP_CTRL.CCDC_WEN_POL[29]=0x1 (wen is not used)

0x480BC040 ISP_CTRL.SBL_SHARED_RPORT[28]=0x1

0x480BC040 ISP_CTRL.SBL_AUTOIDLE[21]=0x1

0x480BC040 ISP_CTRL.SBL_WR0_RAM_EN[20]=0x0

0x480BC040 ISP_CTRL.SBL_WR1_RAM_EN[19]=0x1

0x480BC040 ISP_CTRL.SBL_RD_RAM_EN[18]=0x0

0x480BC040 ISP_CTRL.PREV_RAM_EN[17]=0x0

0x480BC040 ISP_CTRL.CCDC_RAM_EN[16]=0x1

0x480BC040 ISP_CTRL.SYNC_DETECT[15:14]=0x3

0x480BC040 ISP_CTRL.RSZ_CLK_EN[13]=0x0

0x480BC040 ISP_CTRL.PRV_CLK_EN[12]=0x0

0x480BC040 ISP_CTRL. HIST_CLK_EN[11]=0x0

0x480BC040 ISP_CTRL.H3A_CLK_EN[10]=0x0

0x480BC040 ISP_CTRL.CBUFF_AUTOGATING[9]=0x0

0x480BC040 ISP_CTRL.CCDC_CLK_EN[8] =0x1

0x480BC040 ISP_CTRL.SHIFT[7:6]=0x0

0x480BC040 ISP_CTRL.PAR_CLK_POL[4]=0x0

0x480BC040 ISP_CTRL.PAR_BRIDGE[3:2]= 0x0

0x480BC040 ISP_CTRL.PAR_SER_CLK_SEL[1:0]= 0x0

 

0x480BC044 ISP_SECURE = 0x0

0x480BC608 CCDC_SYN_MODE = 0x0070400

0x480BC608 CCDC_SYN_MODE.SDR2RSZ[19] =0x0

0x480BC608 CCDC_SYN_MODE.VP2SDR[18] =0x1

0x480BC608 CCDC_SYN_MODE.WEN[17]       =0x1

0x480BC608 CCDC_SYN_MODE.VDHDEN[16]=0x1

0x480BC608 CCDC_SYN_MODE.FLDSTAT[15] =0x0

0x480BC608 CCDC_SYN_MODE.LPF[14] =0x0

0x480BC608 CCDC_SYN_MODE.INPMOD[13:12] =0x0

0x480BC608 CCDC_SYN_MODE.PACK8[11] =0x0

0x480BC608 CCDC_SYN_MODE.DATSIZ[10:8]=0x4

0x480BC608 CCDC_SYN_MODE.FLDMODE[7] =0x0

0x480BC608 CCDC_SYN_MODE.DATAPOL[6] =0x0

0x480BC608 CCDC_SYN_MODE.EXWEN[5] =0x0

0x480BC608 CCDC_SYN_MODE.FLDPOL[4] =0x0

0x480BC608 CCDC_SYN_MODE.HDPOL[3] =0x0

0x480BC608 CCDC_SYN_MODE.VDPOL[2] =0x0

0x480BC608 CCDC_SYN_MODE.FLDOUT[1] =0x0

0x480BC608 CCDC_SYN_MODE.VDHDOUT[0] =0x0

 

Initialze Cmos Sensor to 612 x 612

 

 

0x480BC600 CCDC_PID = 0x0001fe01

0x480BC604 CCDC_PCR = 0x0

0x480BC608 CDC_SYN_MODE= 0x0070400

 

0x480BC60C CCDC_HD_VD_WID = 0x0

0x480BC610 CCDC_PIX_LINES = 0x0

0x480BC614 CCDC_HORZ_INFO = 0x263

0x480BC618 CCDC_VERT_START = 0x0

0x480BC61C CCDC_VERT_LINES = 0x263

0x480BC620 CCDC_CULLING = 0xffff00ff

0x480BC624 CCDC_HSIZE_OFF = 0x0

0x480BC628 CCDC_SDOFST = 0x0

0x480BC62C CCDC_SDR_ADDR = 0x4057cf84 ??

0x480BC630 CCDC_CLAMP = 0x10

0x480BC634 CCDC_DCSUB = 0x0

0x480BC638 CCDC_COLPTN = 0x1B1B1B1B

0x480BC63C CCDC_BLKCMP = 0x0

0x480BC640 CCDC_FPC = 0x0

0x480BC644 CCDC_FPC_ADDR = 0x0

0x480BC648 CCDC_VDINT = 0x0

0x480BC64C CCDC_ALAW = 0x4

0x480BC650 CCDC_REC656IF = 0x0

0x480BC654 CCDC_CFG = 0x0

0x480BC658 CCDC_FMTCFG = 0x00004000

0x480BC65C CCDC_FMT_HORZ= 0x0

0x480BC660 CCDC_FMT_VERT = 0x0

0x480BC664 CCDC_FMT_ADDRx = 0x0

0x480BC684 CCDC_PRGEVEN0 = 0x0

0x480BC688 CCDC_PRGEVEN1 = 0x0

0x480BC68C CCDC_PRGODD0 = 0x0

0x480BC690 CCDC_PRGODD1 = 0x0

0x480BC694 CCDC_VP_OUT = 0x0F3C0797

0x480BC698 CCDC_LSC_CONFIG = 0x00006600

0x480BC69C CCDC_LSC_INITIAL = 0x0

0x480BC6A0 CCDC_LSC_TABLE_BASE = 0x0

0x480BC6A4 CCDC_LSC_TABLE_OFFSET = 0x0

0x480BC604 CCDC_PCR = 0x1

0x480BC140 CBUFF0_START = 0x28608000

0x480BC150 CBUFF0_END = 0x28bbf100

0x480BC160 CBUFF0_WINDOWSIZE = 0x002db880

0x480BC170 CBUFF0_THRESHOLD = 0xF0

0x480BC174 CBUFF1_THRESHOLD = 0xF0

0x480BC120 CBUFF0_CTRL = 0x5

0x480BC124 CBUFF1_CTRL = 0x0

0x480BC62C CCDC_SDR_ADDR = 0x850c1000

 

0x480BD204 SBL_PCR = 0x00800000 (write to clear overflow)

0x480BC118 CBUFF_IRQSTATUS = 0x2

0x480BC120 CBUFF0_CTRL = 0x1

0x480BC130 CBUFF0_STATUS = 0x00010001

0x480BD208 SBL_GLB_REG_0 = 0x00000018

0x480BD20C SBL_GLB_REG_1 = 0x00000098

0x480BD210 SBL_GLB_REG_2 = 0x00000118

0x480BD214 SBL_GLB_REG_3 = 0x00000198

0x480BD218 SBL_GLB_REG_4 = 0x00000018

0x480BD21C SBL_GLB_REG_5 = 0x00000098

0x480BD220 SBL_GLB_REG_6 = 0x00000118

0x480BD224 SBL_GLB_REG_7 = 0x00000198

 

0x480BD248 SBL_CCDC_WR_0 = 0x0

0x480BD24C SBL_CCDC_WR_1 = 0x0

0x480BD250 SBL_CCDC_WR_2 = 0x0

0x480BD254 SBL_CCDC_WR_3 = 0x0

 

0x480BD258 SBL_CCDC_WR_0 = 0x0

0x480BD248 SBL_CCDC_WR_0 = 0x0

0x480BC608 CCDC_SYN_MODE = 0x00070400

 

 

 

 

 

 

 

 

  • Armen,

    What is the purpose for using the CBUFF logic? You can get the same result by managing your own circular buffer (see end of this posting) with little complexity.  Without having looked at the register settings above, here are some answers/suggestions for your questions:

    Question 1:  

    What is the difference in the address pointers given to the CCDC_SDR_ADDR register and the CBUFF0_START register? I am writing the same pointer to both registers.

    Answer 1: CCDC_SDR_ADDR is the start address where the captured frame data will be written into physical memory.

    From the TRM: The CBUFFx_START and CBUFFx_END register define the virtual address range managed by the circular buffer. It usually corresponds to the address region where one image frame is written by the camera ISP.

    Question 2:

    I am always getting an  IRQ_CBUFF0_INVALID in the CBUFF_IRQSTATUS (IRQ_CBUFF0_INVALID[1]=0x1) register. What could be the cuase of this status error?

    Answer 2:  See TRM table 12.18 for different conditions. In a nutshell:"This event indicates a wrong configuration of the circular buffer, the camera ISP, or bogus software".

    Question 3:

    When I interogate the memory that the ISP is writing to, I always see a data being written. I was hoping that the data does not get written to the memory until I write a 0x1 to  CBUFF0_CTRL. DONE[2] bit. This way I can make sure the data being processed by the CPU is not being changed by the ISP CCDC module.

    Answer 3: This is probably because the CCDC is not in one-shot mode, so it continues to write data in the buffer provided by CCDC_SDR_ADDR. It looks like what you are trying to accomplish could be done easily by managing your own circular buffer as follows:

    0. Setup a buffer that can contain n frames: sizeof n * buffer size, starting on 32 byte boundary (condition for CCDC_SDR_ADD)

    1. Set the CCDC in one-shot mode. This will capture one frame and then suspend the CCDC.

    2. Wait for the frame capture completion -  VDx interrupt from the CCDC (see TRM 12.5.4.3)

    3. check the read vs write buffer pointers or the number of frames captured sofar (looks from your narritive above you want to capture only 2 frames)

    4. If they are close, do not re-enable the CCDC (i.e. drop the next frame)

    5. if they are not close, re-enable the CCDC with the new write address, making sure that you wrap the write address when you have done n frames. You can do all this in the Vertical Sync interval, using the VDx interrupt from the CCDC, latching in the first edge. This is plenty of time to setup the CCDC output and re-enable.

  • Hi Tiemen,

     

    Thanks for your responses.

     

    1. I tried to use the One Shot mode as you suggested by Setting up the Preview engine to take the Raw Data from the CCDC_SDR_ADDR location. I set the PRV_PCR.ONESHOT[3]=1,PRV_PCR.SOURCE[2]=1 and PRV_PCR.ENABLE[0]=1.  Same with the Resizer Set the RSZ_PCR.ONESHOT[2]=1 and RSZ_PCR.ENABLE[0]=1.

    The system hangs up. with BUSY on all 3 registers being high. CCDC_PCR.BUSY[1]=1,PRV_PCR.BUSY[1] and RSZ_PCR.BUSY[1]=1. They never go to 0.

     

    2. I am still confused on the CBUFFx_START register. The Camera document from Ti gives this formula:

    The formula used from TI Document:

    Literature Number: SPRUFA2A
    September 2008

    ADDR = CBUFFx_STATUS [3:0] CPUW x CBUFFx_WINDOWSIZE + CBUFFx_START  1.5.8.6 Operations and

    1.5.8.3 Register Setup

    All registers of the circular buffer to be used (CBUFFx, x=0 or 1) have to be initialized for correct
    operation.
    The CBUFFx_START and CBUFFx_END register define the virtual address range managed by the
    circular buffer. It usually corresponds to the address region where one image frame is written by the
    camera ISP.

     

    Should I be programming the CBUFFx_START with the virtual address of the Physical address space?

     

    Thanks

    Armen.

     

  • Armen,

    On (1) just to make sure, the sequence in which you enable/disable the individual modules should always be in order of their position in the processing chain, where you ENABLE working from the back of the chain (module is ready for data input BEFORE the data stream starts) and DISABLE working from the front of the chain (cut off data in first, let the other modules finish processing the data before you disable them). SInce the chain you use is Camera -> CCDC -> PRV -> RSZ, the sequence that needs to be followed is:


    Enable:  Enable RSZ, Enable PRV, enable CCDC, enable Camera

    Disable:  Disable Camera, Wait for busy "done" then disable CCDC, Wait for busy "done" then disable PRV, Wait for busy "done" then disable RSZ.

    If you do not follow this sequence, the CCDC for example will be putting out data to the PRV, but it has not started yet, so once it starts, it will be busy waiting for data which will never complete the frame, etc.

    I will check on (2)

  • Hi Tiemen,

    Followed your suggestion with CCDC and PRV only no RSZ for now. Enabled: PRV_PCR = 0x10000D(PRV in oneshot and source is memory) and CCDC_PCR =0x1. If I have the CCDC_FMTCFG.VPEN[15] = 1 the CCDC_PCR.BUSY[1]=1 all the time. If I have CCDC_FMTCFG.VPEN[15]=0 the CCDC_PCR.BUSY[1] = transitions from 1 to 0. In this case I disabled the Camera and check the PRV_PCR.BUSY[1] bit which was equal to 1 (busy) all the time.  Also tried to disable the camera before reading the CDC_PCR.BUSY[1] bit . Had the same results.  One caveat is that I am not sure when to turn off the camera if I have to turn it off before the CCDC. I have tried before and after reading the CCDC_PCR register.  I am using the CCDC_PCR.BUSY[1] going to 0 as a Done indicator before I turn off the camera.

    In Summary the busy bit goes off if CCDC_FMTCFG.VPEN[15] =0 and stays high if CCDC_FMTCFG.VPEN[15] =1. Any Suggestions?

     

    Thanks

    Armen.

     

     

  • Armen,

    I think the easiest way is to start from the beginning and do one step at the time, testing each step before moving on to the next.

    The first thing to do is to setup your registers on the CCDC according to TRM tables 12-69 and 12-70 default to using the IPIPE between the different modules (don't capture to memory yet). Once you have done that, enable the CCDC and then the camera and see if you get any data into the CCDC (check to see if you can get any VD0/VD1 interrupts). Leave the PRV and RSZ enabled and do not worry about them yet.  Leave the camera and the CCDC in ENABLED mode, first try to get your VSYNC frame/field capture interrupts working.

    Once you are able to get these interrupts (meaning the CCDC completed the capture), we can go to one-shot mode next. Once you see that the one-shot is completed, we will go and setup the output to memory, etc.

    Let me know when you have completed step 1 - capture the CCDC data and actually see the frame completion interrupts. From that point on we can talk about changing one register set at the time for each consecutive step in the process.

    Regards
    Tiemen

  • Hi Tiemen,

    I did what you asked and built up from simple to memory write enables in one-shot mode. I think the CCDC and Preview engines are working in One-Shot mode. I am having issues with the Re-Sizer Engine. See the 3 different configurations and results below.

    Below are 3 scenarios that I tried. Scenario 1, I had Re-sizer engine input source from preview engine. Scenarios 2 and 3 the Re-sizer engine had it's input set to Pre-View memory space. As you can see below I got overflow interrupts for scenarios 2 and 3 on the Re-Sizer engine. there was some data that was being written to the re-sizer memory space; but, it did not make sense. In Scenario 1 Re-sizer did not write to memory, nor did I get any overflow or any indications that the Re-Sizer was doing anything.

    1. I have the following interrupts occurring after enabling the following registers: RSZ_SDR_INADD = 0x0, RSZ_CNT =0x0003FCFF, RSZ_PCR = 0x5, PRV_PCR = 0x18000D and CCDC_PCR =0x1

    ISP_IRQ0STATUS = 80100300 meaning  CCDC_VD0_IRQ[8] = 1, CCDC_VD1_IRQ[9]= 1, PRV_DONE_IRQ[20]= 1,  HS_VS_IRQ[31]=1 and I see Cmos data in the CCDC memory space and Preview in Preview memory space.The Resizer memory space is not written. (NO ACTIVITY ON RESIZER)

     

    2. I have the following interrupts occurring after enabling the following registers: RSZ_SDR_INADD = buffer_3_pntr, RSZ_CNT =0x1003FCFF, RSZ_PCR = 0x5, PRV_PCR = 0x18000D and CCDC_PCR =0x1

    ISP_IRQ0STATUS = 82100300 meaning  CCDC_VD0_IRQ[8] = 1, CCDC_VD1_IRQ[9]= 1, PRV_DONE_IRQ[20]= 1, OVF_IRQ[25] =1, HS_VS_IRQ[31]=1 and I see Cmos data in the CCDC memory space and Preview in Preview memory space.The Resizer memory space gets updated with a repeating 0x80, 0x00, 0x80, 0x00.... and if I look into SBL_PCR register I see CCDCPRV_2_RSZ_OVF[24]= 1. ( ACTIVITY ON RE-SIZER BUT FAULTY)

    3. I have the following interrupts occurring after enabling the following registers: RSZ_SDR_INADD = buffer_3_pntr, RSZ_CNT =0x1003FCFF, RSZ_PCR = 0x5, PRV_PCR = 0x10000D and CCDC_PCR =0x1

     ISP_IRQ0STATUS = 82100300 meaning  CCDC_VD0_IRQ[8] = 1, CCDC_VD1_IRQ[9]= 1, PRV_DONE_IRQ[20]= 1, OVF_IRQ[25] =1, HS_VS_IRQ[31]=1 and I see Cmos data in the CCDC memory space and Preview in Preview memory space.The Resizer memory space gets updated with a repeating 0x80, 0x00, 0x80, 0x00.... and if I look into SBL_PCR register I see CCDCPRV_2_RSZ_OVF[24]= 1.( ACTIVITY ON RE-SIZER BUT FAULTY)

    P.S  I don't see any Re-sizer  done happening.

    Thanks

    Armen

  • Armen,

    1) This indicates that you have gotten a completion interrupt from the resizer, so you have captured the frame, which is good. You need to make sure in your VD0 or VD1 ISR to swap the input and output buffers to the "pong" buffer (ping-pong scheme with 2 buffers) otherwise you will certainly get the overflow condition you see in scenarios 2 and 3. So it looks like you are correctly setup on the CCDC and the PRV. It looks like your CCDC/PRV combination is working correctly, make sure you have a VD0 or VD1 ISR to ping/pong the CCDC out and PRV input buffers. You also need to allocate 2 buffers to get proper flow between the PRV and the RSZ (ping pong that one too).

    So now that we have narrowed it to the RSZ setup, please make check the following:

    RSZ_PCR - make sure that bit 0 = 1 after every  completion (in memory to memory the RSZ always operates in one-shot mode). Monitor the PCR.BUSY bit to see if it ever goes to 1

    RSZ_IN_START: make sure VERT_STRT = 0 for memory based operations.

    RSZ_SDR_INADDR must point to the appropriate PRV output buffer you are working on

    RSZ_SDR_OUTADDR must point to the capture buffer at the output of the RSZ (Typically the frame buffer for your DSS)

    With the above you should see the RSZ_PCR.BUSY go to 1 and the PCR bit 0 go to 0 after a frame cycle. This indicates that the RSZ did indeed start working, Once BUSY is 0, the RSZ operation is completed.

    The proper overall sequence with everything in one-shot is:

    CCDC setup, PRV setup, RSZ setup - enable RSZ, enable PRV, enable CCDC, enable Camera - wait for VD0/VD1. In the ISR, wait for PRV complete, wait for RSZ complete, switch buffers, enable RSZ, enable PRV, enable CCDC, exit ISR. This should work without a problem as it does in other implementations.

  • Hi Tieman,

     

    I checked the RSZ_IN_START.VERT_STRT =0.

    RSZ_SDR_INADDR  points to the PRV out address.

    RSZ_SDR_OUTADDR is pointer is pointing to the output of the re-sizer memory location.

    Note: I have 3 memory pointers. mem_p0, mem_p1, mem_p2. and they are used up as follows: CCDC->mem_p0,  mem_p0->PRV->mem_p1, mem_p1->RSZ->mem_p2. The way I understand it, I need to ping-pong like this: CCDC->mem_p0b,  mem_p0a->PRV->mem_p1b, mem_p1a->RSZ->mem_p2 after VDD0/1 ISR, CCDC->mem_p0a,  mem_p0b->PRV->mem_p1a, mem_p1b->RSZ->mem_p2

    I think I am following the sequence  you specified. I enabled the RSZ_PCR=0x1, Enable the PRV_PCR = 0x10000D, enable CCDC_PCR =0x1, enable the Camera. I wait for VD0/VD1 and I see it. wait for PRV complete and I do see the it (PRV_PCR.ONESHOT =0 and PRV_PCR.ENABLE=0 and PRV_PCR.BUSY=0), I wait for RSZ_PCR.BUSY=1 and I see it BUSY but it never goes low (always stays high busy). Also  RSZ_PCR.ENABLE =1 . As you mentioned I should not switch ping-pong buffers while the RSZ_PCR.BUSY = 1.

    Note: I never saw a RSZ_DONE_IRQ.  Could it be that I may need to program any filter coefficients or I need a certain minimum Horizontal and Vertical pixel size for the resizer to complete?

    Thanks

    Armen.

  • Armen,
    Believe it or not, the above is good news !! The fact that your RSZ busy bit goes to 1 means that it is processing the input. The fact that it never goes back to 0 means it never gets done. There are a very limited number of reasons why it would do this, the most common one is that there is not enough data in the input buffer to process the frame as you have defined it in the RSZ INSIZE (and to an extend OUTSIZE) registers.

    So, check the RSZ registers (provide a dump if you want to) and check to make sure that your data size setup is less or equal to the amount of data in the input buffer. Also make sure that you have not set up any other registers in the RSZ that could make it not complete.

    One more quick test I would like you to run to make sure you have data integrity now that your data is flowing through the CCDC and the PRV properly. Take the output data from the PRV and use it to drive the DSS and check that the image on the LCD screen is the undistorted image from the camera.

    Regards

    Tiemen

  • Hi Tiemen,

    Here is a dump of the ISP, TCTRL, CCDS, PRV and RSZ registers after the vd0/vd1 interrupt.

     

    CCDC:

    480bc604 00000000

    480bc608 00030400

    480bc60c 00000000

    480bc610 00000000

    480bc614 00000100

    480bc618 00000000

    480bc61c 00000000

    480bc620 ffff00ff

    480bc624 00000000

    480bc628 00000000

    480bc62c 84fe6000

    480bc630 00000010

    480bc634 00000000

    480bc638 00000000

    480bc63c 00000000

    480bc640 00000000

    480bc644 00000000

    480bc648 00030003

    480bc64c 00000004

    480bc650 00000000

    480bc654 00008000

    480bc658 0000c000

    480bc65c 00000200

    480bc660 00000200

    480bc664 00000000

    480bc668 00000000

    480bc66c 00000000

    480bc670 00000000

    480bc674 00000000

    480bc678 00000000

    480bc67c 00000000

    480bc680 00000000

    480bc684 00000000

    480bc688 00000000

    480bc68c 00000000

    480bc690 00000000

    480bc694 03fe2000

    480bc698 00006600

    480bc69c 00000000

    480bc6a0 00000000

    480bc6a4 00000000

     

     

    PRV

    480bce00 0002fe00

    480bce04 00100000

    480bce08 000001ff

    480bce0c 00000200

    480bce10 869d4000

    480bce14 00000000

    480bce18 00000000

    480bce1c 00000000

    480bce20 8641a000

    480bce24 00000000

    480bce28 00000015

    480bce2c 00000300

    480bce30 00000000

    480bce34 00000100

    480bce38 20202020

    480bce3c ee44ee44

    480bce40 00000000

    480bce44 00000000

    480bce48 01000100

    480bce4c 01000100

    480bce50 01000100

    480bce54 01000100

    480bce58 00000100

    480bce5c 00000000

    480bce60 00000000

    480bce64 01c2604c

    480bce68 080eb3d4

    480bce6c 3ec2039e

    480bce70 00000000

    480bce74 00001000

    480bce78 00000000

    480bce7c ff00ff00

    480bce80 00000000

    480bce84 000000e9

    480bce88 00000000

    480bce8c 00000000

    480bce90 00000000

    480bce94 00000000

    480bce98 00000000

    480bce9c 00000000

     

     

     

    RSZ

    480bd000 0010fe00

    480bd004 00000003

    480bd008 1003fcff

    480bd00c 02000200

    480bd010 00000000

    480bd014 02000200

    480bd018 86cb0000

    480bd01c 00000000

    480bd020 866f7000

    480bd024 00000000

    480bd028 00000000

    480bd02c 00000000

    480bd030 00000000

    480bd034 00000000

    480bd038 00000000

    480bd03c 00000000

    480bd040 00000000

    480bd044 00000000

    480bd048 00000000

    480bd04c 00000000

    480bd050 00000000

    480bd054 00000000

    480bd058 00000000

    480bd05c 00000000

    480bd060 00000000

    480bd064 00000000

    480bd068 00000000

    480bd06c 00000000

    480bd070 00000000

    480bd074 00000000

    480bd078 00000000

    480bd07c 00000000

    480bd080 00000000

    480bd084 00000000

    480bd088 00000000

    480bd08c 00000000

    480bd090 00000000

    480bd094 00000000

    480bd098 00000000

    480bd09c 00000000

    480bd0a0 00000000

     

     

     

    ISP/ TCTRL

    480bc004 00001000

    480bc008 00000001

    480bc00c 00000000

    480bc010 82100300

    480bc014 00000000

    480bc018 82100300

    480bc01c 00000000

    480bc020 00000000

    480bc024 00000000

    480bc028 00000000

    480bc02c 00000000

    480bc030 00000000

    480bc034 00000000

    480bc038 00000000

    480bc03c 00000000

    480bc040 203ff300

    480bc044 00000000

    480bc048 00000000

    480bc04c 00000000

    480bc050 d8801084

    480bc054 00000000

    480bc058 00000000

    480bc05c 00000000

    480bc060 00000000

    480bc064 00000000

    480bc068 00000000

    480bc06c 00000000

    Thanks

    Armen

     


  •  

    Second dump of registers:

     

    ccdc
    480bc600 0001fe01
    480bc604 00000001
    480bc608 00030400
    480bc60c 00000000
    480bc610 00000000
    480bc614 000001ff
    480bc618 00000000
    480bc61c 000001ff
    480bc620 ffff00ff
    480bc624 00000000
    480bc628 00000000
    480bc62c 84fd0000
    480bc630 00000010
    480bc634 00000000
    480bc638 00000000
    480bc63c 00000000
    480bc640 00000000
    480bc644 00000000
    480bc648 00030003
    480bc64c 00000004
    480bc650 00000000
    480bc654 00008000
    480bc658 0000c000
    480bc65c 00000200
    480bc660 00000200
    480bc664 00000000
    480bc668 00000000
    480bc66c 00000000
    480bc670 00000000
    480bc674 00000000
    480bc678 00000000
    480bc67c 00000000
    480bc680 00000000
    480bc684 00000000
    480bc688 00000000
    480bc68c 00000000
    480bc690 00000000
    480bc694 03fe2000
    480bc698 00006600
    480bc69c 00000000
    480bc6a0 00000000

    PRV
    480bce00 0002fe00
    480bce04 00100000
    480bce08 000001ff
    480bce0c 00000200
    480bce10 85866000
    480bce14 00000000
    480bce18 00000000
    480bce1c 00000000
    480bce20 852ad000
    480bce24 00000000
    480bce28 00000015
    480bce2c 00000300
    480bce30 00000000
    480bce34 00000100
    480bce38 20202020
    480bce3c ee44ee44
    480bce40 00000000
    480bce44 00000000
    480bce48 01000100
    480bce4c 01000100
    480bce50 01000100
    480bce54 01000100
    480bce58 00000100
    480bce5c 00000000
    480bce60 00000000
    480bce64 01c2604c
    480bce68 080eb3d4
    480bce6c 3ec2039e
    480bce70 00000000
    480bce74 00001000
    480bce78 00000000
    480bce7c ff00ff00
    480bce80 00000000
    480bce84 000000e9
    480bce88 00000000
    480bce8c 00000000
    480bce90 00000000
    480bce94 00000000
    480bce98 00000000
    480bce9c 00000000
    480bcea0 00000000

    RSZ
    480bd000 0010fe00
    480bd004 00000003
    480bd008 1003fcff
    480bd00c 02000200
    480bd010 00000000
    480bd014 02000200
    480bd018 85b43000
    480bd01c 00000000
    480bd020 8558a000
    480bd024 00000000
    480bd028 00000000
    480bd02c 00000000
    480bd030 00000000
    480bd034 00000000
    480bd038 00000000
    480bd03c 00000000
    480bd040 00000000
    480bd044 00000000
    480bd048 00000000
    480bd04c 00000000
    480bd050 00000000
    480bd054 00000000
    480bd058 00000000
    480bd05c 00000000
    480bd060 00000000
    480bd064 00000000
    480bd068 00000000
    480bd06c 00000000
    480bd070 00000000
    480bd074 00000000
    480bd078 00000000
    480bd07c 00000000
    480bd080 00000000
    480bd084 00000000
    480bd088 00000000
    480bd08c 00000000
    480bd090 00000000
    480bd094 00000000
    480bd098 00000000
    480bd09c 00000000
    480bd0a0 00000000
    480bd0a4 00000000
    480bd0a8 00000000
    480bd0ac 00000000
    480bd0b0 00000000
    480bd0b4 00000000
    480bd0b8 00000000
    480bd0bc 00000000
    480bd0c0 00000000
    480bd0c4 00000000
    480bd0c8 00000000
    480bd0cc 00000000
    480bd0d0 00000000
    480bd0d4 00000000
    480bd0d8 00000000
    480bd0dc 00000000
    480bd0e0 00000000
    480bd0e4 00000000
    480bd0e8 00000000
    480bd0ec 00000000
    480bd0f0 00000000
    480bd0f4 00000000
    480bd0f8 00000000
    480bd0fc 00000000
    480bd100 00000000
    480bd104 00000000
    480bd108 00000000
    480bd10c 00000000

    ISP
    480bc004 00001000
    480bc008 00000001
    480bc00c 00000000
    480bc010 82100000
    480bc014 00000000
    480bc018 82100000
    480bc01c 00000000
    480bc020 00000000
    480bc024 00000000
    480bc028 00000000
    480bc02c 00000000
    480bc030 00000000
    480bc034 00000000
    480bc038 00000000
    480bc03c 00000000
    480bc040 203ff300
    480bc044 00000000
    480bc048 00000000
    480bc04c 00000000
    480bc050 d8801084
    480bc054 00000000
    480bc058 00000000
    480bc05c 00000000
    480bc060 00000000
    480bc064 00000000
    480bc068 00000000
    480bc06c 00000000
    480bc070 00000000
    480bc074 00000000
    480bc078 00000000
    480bc07c 00000000
    480bc080 00000000
    480bc084 00000000
    480bc088 00000000
    480bc08c 00000000
    480bc090 00000000
    480bc094 00000000
    480bc098 00000000
    480bc09c 00000000
    480bc0a0 00000000
    480bc0a4 00000000
    480bd0a4 00000000
    480bd0a8 00000000
    480bd0ac 00000000
    480bd0b0 00000000
    480bd0b4 00000000
    480bd0b8 00000000
    480bd0bc 00000000
    480bd0c0 00000000
    480bd0c4 00000000
    480bd0c8 00000000
    480bd0cc 00000000
    480bd0d0 00000000
    480bd0d4 00000000
    480bd0d8 00000000
    480bd0dc 00000000
    480bd0e0 00000000
    480bd0e4 00000000
    480bd0e8 00000000
    480bd0ec 00000000
    480bd0f0 00000000
    480bd0f4 00000000
    480bd0f8 00000000
    480bd0fc 00000000
    480bd100 00000000
    480bd104 00000000
    480bd108 00000000
    480bd10c 00000000



  • Hi all

    I looking for example code,

    I have the EVB from mistral omap 30xx,

    I connected to the camera interface connector a raw data from Sony CCD (the FPGA make the raw no translation).

    I need hint how to start get the war data and display on the LCD.

     

    Regards,

    Doron sandroy

    Tonson Lab