STM32F427 HAL I2C Slave
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-05-13 12:44 AM
Posted on May 13, 2014 at 09:44
Hello
I work with STM32CubeMX with Keil and to realize a I2C Slave withe the STM32F427. I have 2 questions:- STM32CubeMX: I2Cx Configuration: Primary slave address is a 7bit value --> 0..127 In the file stm32fxx_hal_i2c.c the OAR1-Register will be initialized like: hi2c->Instance->OAR1 = (hi2c->Init.AddressingMode | hi2c->Init.OwnAddress1); In my opinion the OwnAddress1 needs to be shiftet left for 1 bit.
- Doing a HAL_I2C_Slave_Receive_IT() the function HAL_CAN_IRQHandler() will be called in stm32f4xx_it.c. According the documentation there should be a callback to HAL_I2C_SlaveRxCpltCallback. In HAL_I2C_EV_IRQHandler I do not find any callback request...
Labels:
- Labels:
-
I2C
-
STM32Cube MCU Packages
This discussion is locked. Please start a new topic to ask your question.
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-06-23 3:02 AM
Posted on June 23, 2014 at 12:02
Hello C Fahrni,
Could you please attach your project .ioc file, to have enough insight into what specifically you are doing.What version of CubeMX are you using ?With regard.Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-06-27 2:48 AM
Posted on June 27, 2014 at 11:48
Hi C Fahrni,
Please find below the answers to your questions:- STM32CubeMX tool will be enhanced in order to shift left for 1 bit the OwnAddress1 to bypass this limitation when configuring I2C peripheral.
- Within the slave receiver, the last event is the detection of stop flag, handled by I2C_Slave_STOPF() where the HAL_I2C_SlaveRxCpltCallback(hi2c) is called.
