i2cm_write(), i2cm_read() or wiced_hal_i2c_write(), wiced_hal_i2c_read() functions work well when SDA/SCL lines are correctly pulled up and a slave device is correctly connected.
But when these lines are not pulled up, these functions are not return forever.
In many case, with watchdog timer, system will reset.
I'd like to check if I2C line is OK and even if there are some problems, I want firmware to proceed to next process and to output warnings.
Please tell me a work around for this issue or how to set timeout.
Solved! Go to Solution.
Hi ToKo_4602001 ,
However , Instead of external pull up, can you configure internal gpio pull up on those pins (using wiced_hal_gpio_configure_pin - so the device won't kick the watchdog ) and try if the device resets? If this works, you can use this method as a work around.
Thank you for your reply.
Unfortunately once I set a role of GPIO with wiced_hal_gpio_select_function(), it seems that wiced_hal_gpio_configure_pin() is ignored.
So as workaround, at start-up I will reset GPIO to normal input and then check input level. If input level is high, I will set GPIO to I2C again with wiced_hal_gpio_select_function().