Skip to content

Commit f0bc20c

Browse files
daniel-p-carvalhoxiaoxiang781216
authored andcommitted
Fix I2C1 pinout.
1 parent 4f985f4 commit f0bc20c

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

boards/arm/stm32l4/nucleo-l432kc/include/board.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,10 @@
126126
* but are normally-high GPIOs.
127127
*/
128128

129-
#define GPIO_I2C1_D4 \
130-
(GPIO_INPUT | GPIO_FLOAT | GPIO_PORTB | GPIO_PIN7)
131-
#define GPIO_I2C1_D5 \
132-
(GPIO_INPUT | GPIO_FLOAT | GPIO_PORTB | GPIO_PIN6)
129+
#define GPIO_I2C1_A4 \
130+
(GPIO_INPUT | GPIO_FLOAT | GPIO_PORTA | GPIO_PIN5)
131+
#define GPIO_I2C1_A5 \
132+
(GPIO_INPUT | GPIO_FLOAT | GPIO_PORTA | GPIO_PIN6)
133133
#define GPIO_I2C1_SCL \
134134
(GPIO_I2C1_SCL_1 | GPIO_OPENDRAIN | GPIO_SPEED_50MHz | GPIO_OUTPUT_SET)
135135
#define GPIO_I2C1_SDA \

boards/arm/stm32l4/nucleo-l432kc/src/stm32_ina226.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ int stm32_ina226initialize(const char *devpath)
8080

8181
sninfo("Initializing INA226\n");
8282

83-
/* Configure D4(PA5) and D5(PA6) as input floating */
83+
/* Configure A4(PA5) and A5(PA6) as input floating */
8484

85-
stm32l4_configgpio(GPIO_I2C1_D4);
86-
stm32l4_configgpio(GPIO_I2C1_D5);
85+
stm32l4_configgpio(GPIO_I2C1_A4);
86+
stm32l4_configgpio(GPIO_I2C1_A5);
8787

8888
/* Get an instance of the I2C1 interface */
8989

0 commit comments

Comments
 (0)