Hi,

Has anyone used the I2C functionality on the STM Nucleo-32 board (it uses the STM32L432 processor)? I think there is an issue with the file boards/arm/stm32l4/nucleo-l432kc/src/stm32_ina226.c.

This board can support Arduino NANO pinout compatibility by using links on the PCB. Section '6.10 Solder bridges' of doc. 'UM1956 User manual STM32 Nucleo-32 boards (MB1180)' details these links.

One option for the I2C1 interface is to use STM32L432 pins PB_7 (function I2C1_SDA, PCB pin D4) & PA_6 (function I2C1_SCL, PCB pin D5), which are linked by solder bridges on the PCB to STM32L432 pins PA_6 (PCB pin A5) & PA_5 (PCB pin A4) to maintain Arduino NANO pinout compatibility.

The webpage os.mbed.com/platforms/ST-Nucleo-L432KC has a picture of the PCB showing the pinout options, and this Information:

By default the PA_5 (A4) and PA_6 (A5) pins can only be used as Input floating (ADC function). Remove SB16 and SB18 solder bridges in order to use these pins as Digital output and have access
to other functions (DigitalOut, SPI, PWM, etc...).

The file boards/arm/stm32l4/nucleo-l432kc/src/stm32_ina226.c contains these lines:

   /* Configure D4(PA5) and D5(PA6) as input floating */

   stm32l4_configgpio(GPIO_I2C1_D4);
   stm32l4_configgpio(GPIO_I2C1_D5);

Where GPIO_I2C1_D4 & GPIO_I2C1_D5 are defined in boards/arm/stm32l4/nucleo-l432kc/include/board.h

However the device pins PA5 and PA6 correspond to PCB pins A4 and A5 respectively, not PCB pins D4 and D5. These calls to the stm32l4_configgpio functions cause the I2C1 lines to be disabled.

Kind regards

Stewart Charnell


Reply via email to