2017-11-28 03:00 PM
NUCLEO-L432KC I2C3 issue
I am using two STM32 L432KC board to test I2C functions. It works fine with both master and slave using I2C1 with pin PB6 (SCL) and PB7 (SDA). But I can't make it work on one side use I2C3
with pin PA7 (SCL) and pin PB4 (SDA). Just can't make the I2C3 working on both master or slave. does anyone has same issue?I am using the sample code from STM32Cube_FW_L4_V1.10.0 - STM32L432KC-Nucleo.
#nucleo-l432kc-i2c32017-11-28 03:04 PM
generally its the pullup resistors, you need a 10k on both lines SDA and SCLK pulled upto 3V.
distance maximum approx 500mm
then the address is 7 bit, you have to shift your address up one bit
7bitaddress = 8bitAddress <<1;
EDIT:
do you need to use PB4 ?
its a special pin used for NJTRST.
PB4:
NJTRST, I2C3_SDA,
SPI1_MISO, SPI3_MISO,USART1_CTS, TSC_G2_IO1,SAI1_MCLK_B, EVENTOUT