cancel
Showing results for 
Search instead for 
Did you mean: 

Bluetooth SDK

ToKo_4602001
New Contributor II

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

0 Likes
1 Solution
AnjanaM_61
Moderator
Moderator

Hi ToKo_4602001 ,

If this serves your application requirement , please use  the same.

Regards,

Anjana

View solution in original post

0 Likes
4 Replies
AnjanaM_61
Moderator
Moderator

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

AnjanaM_61
Moderator
Moderator

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

0 Likes
ToKo_4602001
New Contributor II

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

0 Likes
AnjanaM_61
Moderator
Moderator

Hi ToKo_4602001 ,

If this serves your application requirement , please use  the same.

Regards,

Anjana

View solution in original post

0 Likes