Going mad about I2C #i2c #stm32 #nrf51822

Roman Tataurov
 

Hello!

Today almost whole day frustrating trying to make work I2C on Zephyr.
Tested on 2 different boards with nrf51822 and stm32f103 MCU-s and got no success.

Any options for both MCU-s different than bitbang I2C even return null for device_get_binding so I can't even initialize it. 
In case of bitbang I2C implementation device driver exists but does not work. Mean code executed, but I see nothing on MCU pins. 
Mapped to different GPIO variants, checked with logick analyzer on all the pins but nothing. It just does not work at all.

So can anobody explain right path to make it finally work.

So for STM32 (not a bitbang) used with:

CONFIG_GPIO=y
CONFIG_GPIO_STM32=y
CONFIG_GPIO_STM32_PORTA=y
CONFIG_GPIO_STM32_PORTB=y

CONFIG_I2C=y
CONFIG_I2C_INIT_PRIORITY=60
CONFIG_SYS_LOG_I2C_LEVEL=4
# CONFIG_I2C_0 is not set     <-------- tested with this as well
CONFIG_I2C_1=y 
# CONFIG_I2C_2 is not set
# CONFIG_I2C_3 is not set
# CONFIG_I2C_DW is not set
# CONFIG_I2C_GPIO is not set
# CONFIG_I2C_SBCON is not set
CONFIG_I2C_STM32=y
CONFIG_I2C_STM32_V1=y

For nrf51 dont remember but can try again and put config here.

Any help appreciated.


Join users@lists.zephyrproject.org to automatically receive all group messages.