Hi,
I am trying to get the circular buffer going, but it doesn't. I need some help.
Possibly I missed a register or I misunderstood chapter 12.5.8 in the hardware reference manuel.
I debugged my kernel module and it seems that no IRQ is sent from ISP to the MPU.
My kernel module does the following:
(A) Init CCDC and CBUFF
I programmed the CBUFF register like suggested in the , chapter :
(1) Initialisation of ISP and CCDC
(2) Config CBUFF: ISP_CBUFF0_CTL (WCOUNT=0x2, BCF=0x0, ALLOW_NW=0x0, DONE=0x0, RWMODE=0x0, ENABLE=0x0) -> Window count is 8
(3) Window size is an 8th of frame size: ISP_CBUFF0_WINDOWSIZE = ResX * ResY * 2bpp / 8
(4) Threshold is set to window size: ISP_CBUFF0_THRESHOLD = WINDOWSIZE
(5) Allocation of a framebuffer, with the size of one frame. Sending its virtual kernel address VADDR to ISP_CBUFF0_START ( the last three bit are zeros, thus the address is 64bit alligned).
(6) Sending end of framebuffer to ISP_CBUFF0_END = VADDR + WINDOWSIZE * WINDOWCOUNT
(7) Enable the CPUW ready IRQ: ISP_CBUFF_IRQENABLE = 0x1
(8) Enable CBUFF: ISP_CBUFF0_CTL[0] = 0x1
(9) Enable ISP IRQ for CBUFF, enable CCDC
(B) Interrupt handling
Each time a window is filled up by CBUFF, an IRQ is sent. The IRQ handler sets the DONE bit in ISP_CBUFF0_CTRL register to 0x1 after processing the data.
After a whole frame is processed, CBUFF is disabled and enabled again to reset the buffers's start address to ISP_CBUFF0_START.
I appreciate any feedback.
Regards,
Sebastian Kruber