AnsweredAssumed Answered

STM32F427 HAL I2C Slave

Question asked by Fahrni.Christoph on May 13, 2014
Latest reply on Jun 27, 2014 by Montassar BEN ROMDHANE
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...
Thanks a lot for reading and finding a solution.
 C Fahrni

Outcomes