819
/
838
Nations Technologies Inc.
Tel
:
+86-755-86309900
:
Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North.
Nanshan District, Shenzhen, 518057, P.R.China
28.3.6
Soft reset
The DVP_CTRL.FFSWRST controls the soft reset. The soft reset is a synchronous reset. Write 1 to reset. Because it
is a synchronous reset, it must be ensured that the input pixel clock (DVP_PCLK) and the DVP module clock (APB2
clock PCLK2) exist at the same time.
The soft reset requires 8 PCLK2 clock cycles to synchronize. Do not operate the registers during the soft reset. The
soft reset only resets the state machine, not the registers. It is recommended that users use a soft reset before each
image capture.
Note: The DVP_CTRL.CAPTURE must be set to 0 before soft reset, and the pixel clock (DVP_PCLK) must be clocked
during this period.
28.3.7
Interrupts
There are three registers related to interrupts, DVP_INTSTS, DVP_INTEN, DVP_MINTSTS:
DVP_INTEN is the interrupt enable register.
DVP_INTSTS is the interrupt status register. Even if the interrupt is not enabled, the interrupt status will change,
but the interrupt will not be reported to the system. The corresponding interrupt will be reported only after the
corresponding interrupt enable bit in DVP_INTEN is turned on.
DVP_MINTSTS is the register of interrupt status that reported to system, and users generally only use this status
to check the interrupt status.
When the user wants to use an interrupt, the corresponding flag in the register DVP_INTSTS must be cleared
(write 0 to clear) first, in order to avoid the previous state affecting of the interrupt reporting.
There are two special flag bits in the DVP_INTSTS register: FIFO watermark flag FWIS, FIFO full flag FFIS.
These two flag bits are related to the real-time status of the FIFO and cannot be cleared by writing 0, only cleared
by reading the FIFO.
28.3.8
Read FIFO data
FIFO data can be read directly by software, and also supports DMA or interrupt mode.
DMA mode: when the FIFO data reaches the waterline value (FWM, must be 1), a DMA request will be
generated, and the DMA will move the data to the configured SRAM;
Interrupt mode: When the FIFO data reaches the watermark value (FWM), an interrupt will be generated, and
the user will read the data through the register DVP_FIFO
Note: Because the data from the interface is 8 bits, but the data in the FIFO is 32 bits, the module will put the first
data in the high order.
28.3.9
Notes
It must be ensured that the external CMOS optical sensor clock is turned on first, that is, DVP_PCLK is valid.