cancel
Showing results for 
Search instead for 
Did you mean: 

CPAL_I2C_HAL_GPIODeInit(...) can fail

matt_dyhrberg
Associate
Posted on December 17, 2013 at 04:24

In version 1.2.0 of the CPAL I2C library, function CPAL_I2C_HAL_GPIODeInit(...) can fail when it calls the Standard Peripheral Library function GPIO_Init (...) due to  GPIO_InitStructure.GPIO_PuPd not being initialized.

Suggest adding GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL; prior to the first call to GPIO_Init(...) (line 269 in cpal_i2c_hal_stm32F2xx.c)

#cpal-i2c-stm32
1 REPLY 1
matt_dyhrberg
Associate
Posted on December 17, 2013 at 04:31

More explicitly:

If USE_FULL_ASSERT is defined, GPIO_Init (...) can fail at line 196:    assert_param(IS_GPIO_PUPD(GPIO_InitStruct->GPIO_PuPd));