- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi ToKo_4602001 ,
Unfortunately there is no way to avoid this system reset when I2C is initialized and no I2C device is connected in 20819.
Regards,
Anjana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Regards,
Anjana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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().
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content