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.

ISP CCDC not writing to memory

Greetings,

I've set up a low level ISP driver in Linux and the CCDC isn't writing image data to memory.  Can you help me diagnose this?

  • The driver is intended to collect raw data from a monochrome Aptina sensor with 752x480 resolution.  It uses the CCDC to write raw 8-bit data directly to memory without using the previewer, resizer, etc.
  • I can verify proper signals on the HSync, Vsync, CLK, and data lines using an oscilloscope.
  • The ISP is soft reset before programming any registers.
  • The CCDC is configured to trigger interrupts using the VD0 event.  This appears to work since I get an interrupt for every frame (60 fps), but only if I set the CCDC_VDINT register to 479 or less.  So, presumably the CCDC is collecting data with the proper synchronization.
  • The memory address in the CCDC_SDR_ADDR register has been set to a vacant area above that used by Linux.
  • In my interrupt handler routine I wait for the CCDC_PCR[1] BUSY bit to drop before copying the image data.  This takes 10-30 us.
  • After my interrupt handler the SBL debug registers are all zeros, indicating (I think) that the CCDC is not attempting to write to memory.
  • The contents of the image buffer memory remain all zeros.
  • Some relevant registers are copied below; let me know if I should grab any others.

Thanks
Michael

[15624.145507]   0x480bc040                 ISP_CTRL = 0x0001b100
[15624.151428]   0x480bc00c           ISP_IRQ0ENABLE = 0x00000100
[15624.157348]   0x480bc010           ISP_IRQ0STATUS = 0x00000000
[15624.163238]   0x480bc604              ISPCCDC_PCR = 0x00000001
[15624.169189]   0x480bc654              ISPCCDC_CFG = 0x00000000
[15624.175109]   0x480bc608         ISPCCDC_SYN_MODE = 0x00070f00
[15624.181060]   0x480bc620          ISPCCDC_CULLING = 0xffff00ff
[15624.187011]   0x480bc614        ISPCCDC_HORZ_INFO = 0x000000ff
[15624.192871]   0x480bc618       ISPCCDC_VERT_START = 0x00000000
[15624.198791]   0x480bc61c       ISPCCDC_VERT_LINES = 0x000000ff
[15624.204711]   0x480bc624        ISPCCDC_HSIZE_OFF = 0x00000100
[15624.210632]   0x480bc62c         ISPCCDC_SDR_ADDR = 0x87800000
[15624.216491]   0x480bc648            ISPCCDC_VDINT = 0x00ff0000
[15624.222412]   0x480bc654              ISPCCDC_CFG = 0x00000000
[15624.228332]   0x480bc658           ISPCCDC_FMTCFG = 0x00004000
  • Bringing this up to the top since it's been a few days.

    Michael

     

  • Can someone perhaps walk me through the debugging thought process here?  I've tried using a driver for another camera sensor (an OV3640 from an e-con systems board) that works when used with that sensor.  This isn't going to give me correct data, I just want to capture something.  If I manually turn on capture on the MT9V024 using I2C command line tools, this driver triggers the CCDC interrupts but also doesn't save any data.  Perhaps I'm doing something very stupid... what might cause that? 

    Thanks

    Michael

     

  • The ISP CCDC does not write to memory, instead it will send the data directly to the the next component in the ISP.  (CCDC->Previewer->Resizer->Memory) .  The driver is by default sets up the pipeline and does not send to memory.  

    The last time I touched this driver was in the 2.6.22 kernel and the driver infrastructure has changed since that kernel.  The ISP driver was modified to write to memory/read from memory between each step.  (CCDC->memory->Previewer->memory->Resizer->Memory)  This was made to handle a corruption in the video signal due to high EMI.