I2C on nucleo L476RG


Nicolas Gonzalez <nicolas@...>
 

Hello,

I am new to Zephyr and i try to use I2C on my nucleo L476RG.

dev = device_get_binding(CONFIG_I2C_1_NAME);
^ This always return NULL.

I saw in the pinmux.c that I2C_1 could be used :
#ifdef CONFIG_I2C_1
{STM32_PIN_PB6, STM32L4X_PINMUX_FUNC_PB6_I2C1_SCL},
{STM32_PIN_PB7, STM32L4X_PINMUX_FUNC_PB7_I2C1_SDA},
#endif /* CONFIG_I2C_1 */

I decided to add these lines to my prf.conf :
CONFIG_I2C=y
CONFIG_I2C_1=y
CONFIG_I2C_1_IRQ_PRI=1

It doesn't work at all ...
I tried to modify the device tree of the board but unsuccessful too :)

Thank you for your help,
ngonzalez

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