2013-12-16 07:24 PM
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-stm322013-12-16 07:31 PM
More explicitly:
If USE_FULL_ASSERT is defined, GPIO_Init (...) can fail at line 196: assert_param(IS_GPIO_PUPD(GPIO_InitStruct->GPIO_PuPd));