cancel
Showing results for 
Search instead for 
Did you mean: 

I2C

James Zhou
Associate II
Posted on November 27, 2017 at 17:17

I am using two STM32 L432KC board to test I2C function (one for master and another one for slave) running the sample code from 'I2C_TwoBoards_AdvComIT'.  Seems like I never get the event interrupt and never reach 'HAL_I2C_EV_IRQHandler(&I2cHandle)' .  The Master and Slave are both waiting the HAL_I2C_STATE_READY.

Any idea what's wrong? Anyone?

Thanks

#i2c-slave
4 REPLIES 4
Pavel A.
Evangelist III
Posted on November 27, 2017 at 17:59

This seems to be a frequent and notorious problem that some people have  - but (obviously) most of others do not. If you search the forums, some workarounds have been proposed - find the culprit that holds on the clock line, generate few stop states, reset the I2C controller (by it's control register).... 

-- pa

Posted on November 27, 2017 at 19:02

Thanks a lot. I found the problem. It is the wiring issue. Now the I2C communicate between two boards.

Thanks again for the quick response.

-

On Mon, 27 Nov 2017 07:00:14 -1000 pavel a <st-microelectronics@jiveon.com> wrote -

STMicroelectronics Community

Re: I2C

reply from pavel a in STM32 MCUs Forum - View the full discussion

This seems to be a frequent and notorious problem that some people have - but (obviously) most of others do not. If you search the forums, some workarounds have been proposed - find the culprit that holds on the clock line, generate few stop states, reset the I2C controller (by it's control register)....

-- pa

Reply to this message by replying to this email, or go to the message on STMicroelectronics Community

Start a new discussion in STM32 MCUs Forum by email or at STMicroelectronics Community

Following Re: I2C in these streams: Inbox

This email was sent by STMicroelectronics Community because you are a registered user.

You may unsubscribe instantly from STMicroelectronics Community, or adjust email frequency in your email preferences

James Zhou
Associate II
Posted on November 28, 2017 at 06:49

Hi Pavel;

I did more I2C  test with two

STM32 L432KC board. One board is set up as I2C1 master with pin PB6 (SCL) and pin PB7 (SDA). another board is set up as I2C1 slave with pin PA9 (SCL) and PA10 (SDA). But it doesn't work. I also tried I2C3 as slave with pin PA7 (SCL) and PB4 (SDA) but still failed. Seems like only work with both side (master and slave) using I2C1 (PB6 and PB7).

Our application need use I2C1 as master and I2C3 as slave. I can't make I2C3 as slave with PA7 and PB4. Please help. Thanks

Posted on November 28, 2017 at 06:51

Hi Pavel;

I did more I2C test with two STM32 L432KC board. One board is set up as I2C1 master with pin PB6 (SCL) and pin PB7 (SDA). another board is set up as I2C1 slave with pin PA9 (SCL) and PA10 (SDA). But it doesn't work. I also tried I2C3 as slave with pin PA7 (SCL) and PB4 (SDA) but still failed. Seems like only work with both side (master and slave) using I2C1 (PB6 and PB7).

Our application need use I2C1 as master and I2C3 as slave. I can't make I2C3 as slave with PA7 and PB4. Please help. Thanks

-

On Mon, 27 Nov 2017 07:00:14 -1000 pavel a <st-microelectronics@jiveon.com> wrote -

STMicroelectronics Community

Re: I2C

reply from pavel a in STM32 MCUs Forum - View the full discussion

This seems to be a frequent and notorious problem that some people have - but (obviously) most of others do not. If you search the forums, some workarounds have been proposed - find the culprit that holds on the clock line, generate few stop states, reset the I2C controller (by it's control register)....

-- pa

Reply to this message by replying to this email, or go to the message on STMicroelectronics Community

Start a new discussion in STM32 MCUs Forum by email or at STMicroelectronics Community

Following Re: I2C in these streams: Inbox

This email was sent by STMicroelectronics Community because you are a registered user.

You may unsubscribe instantly from STMicroelectronics Community, or adjust email frequency in your email preferences