Re: I2C on nucleo L476RG


Yannis Damigos
 

Hi Nicolas,

did you also update dts.fixup file in boards directory?

Best regards,
Yannis

On Sun, Nov 12, 2017 at 4:31 PM, Nicolas Gonzalez <nicolas@ngonzalez.fr> wrote:
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
_______________________________________________
Zephyr-users mailing list
Zephyr-users@lists.zephyrproject.org
https://lists.zephyrproject.org/mailman/listinfo/zephyr-users

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