2016-03-07 07:52 AM
This is from the 1.0 driver. (I'm downloading the next version but it is going. Real. Slow.)
FromSTM32Cube\Repository\STM32Cube_FW_F4_V1.0\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dcmi.c
InHAL_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 callHAL_DCMI_Init() (instm32f4xx_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.0 version and it is the same.
#dcmi-stm32f42016-03-08 12:54 AM
Hello HankB,
I suggest you calling HAL_DCMI_DeInit() between HAL_DCMI_Stop() and HAL_DCMI_Init() to de-initialize the DCMI.-ForumSTM32-2016-03-17 06:00 AM
That looks like a reasonable work around.
And in other words, you do not see the inability to 'start' after issuing 'stop' a bug? It seems pretty clear to me that if the DCMI has been deinitialized that setting the state to 'ready' is not correct.thanks,hank