AnsweredAssumed Answered

Is this a bug in the HAL DCMI driver?

Question asked by Barta.Hank on Mar 7, 2016
Latest reply on Mar 17, 2016 by Barta.Hank
This is from the 1.10.0 driver. (I'm downloading the next version but it is going. Real. Slow.)

From STM32Cube\Repository\STM32Cube_FW_F4_V1.10.0\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dcmi.c

In HAL_DCMI_Stop() on line #416 the driver sets the state to 'ready' after disabling the DCMI IP.
/* Change DCMI state */
hdcmi->State = HAL_DCMI_STATE_READY;

If we now call  HAL_DCMI_Init() (in stm32f4xx_hal_dcmi_ex.c) there is coded to skip the initiailzation of the IP if the state is not reset:
if(hdcmi->State == HAL_DCMI_STATE_RESET)
{
  /* Init the low level hardware */
  HAL_DCMI_MspInit(hdcmi);
}


Is this a bug or am I misunderstanding something about how the HAL DCMI library works?

Thanks!

NB, the download failed but a coworker provided a copy of this file from the 1.11.0 version and it is the same.

Outcomes