Hello,
I am debuging the project csi_rgb565.
After interrupt occurs, in CSI_TransferHandleIRQ, I want to clear the status of Start of Frame by writing 1 by:
uint32_t csisr = CSI_REG_SR(base);
CSI_REG_SR(base)= csisr | CSI_CSISR_SOF_INT_MASK;
After excuting this line, the bit16 is still active "1" when I read out the value of CSI_REG_SR(base). Thus, during the next interrupt, this bit is still 1.
I think the interrupt of SOF should be less often than "CSI_CSISR_DMA_TSF_DONE_FB2_MASK" and "CSI_CSISR_DMA_TSF_DONE_FB1_MASK" since each frame needs multiple DMA transferring.
However, the user manual says "SOF_INT: Start of Frame Interrupt Status. Indicates when SOF is detected. (Cleared by writing 1)".
How can I manually clear this status of SOF? Is there anything wrong in the piece of code?
Thank you.