cancel
Showing results for 
Search instead for 
Did you mean: 

Is this a bug in the HAL DCMI driver?

hbarta2
Associate III
Posted on March 07, 2016 at 16:52

This is from the 1.0 driver. (I'm downloading the next version but it is going. Real. Slow.)

From

STM32Cube\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-stm32f4
2 REPLIES 2
slimen
Senior
Posted on March 08, 2016 at 09:54

Hello HankB,

I suggest you calling HAL_DCMI_DeInit() between HAL_DCMI_Stop() and HAL_DCMI_Init() to de-initialize the DCMI.

-ForumSTM32-
hbarta2
Associate III
Posted on March 17, 2016 at 14:00

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