HAL DCMI How to Use

group DCMI_How_To_Use

How to use the DCMI HAL module driver

The sequence below describes how to use this driver to capture image from a camera module connected to the DCMI Interface. This sequence does not take into account the configuration of the camera module, which must be made before configuring and enabling the DCMI to capture images.

A set of functions allowing to initialize the HAL DCMI driver and link it to a physical DCMI peripheral instance and to deinitialize the DCMI peripheral by aborting/stopping any ongoing process and resetting the HAL DCMI handle state:

Mandatory Configuration

Optional Configuration

HAL_DCMI_StartPipe_DMA() : Start a frame capture process according to the given parameters: capture mode (continuous/snapshot), destination memory Buffer address and the data length

HAL_DCMI_StartPipe_DMA_Opt() : Provide one additional parameter allowing to select the optional interrupts that can be enabled during the capture process

Configure the selected DMA channel to transfer Data from DCMI DR register to the destination memory buffer.

The capture can be stopped using HAL_DCMI_StopPipe_DMA() function.

The capture can be suspend using HAL_DCMI_SuspendPipe() function and resume by HAL_DCMI_ResumePipe() function.

Callback registration