STMicroelectronics / STM32CubeF4

STM32Cube MCU Full Package for the STM32F4 series - (HAL + LL Drivers, CMSIS Core, CMSIS Device, MW libraries plus a set of Projects running on all boards provided by ST (Nucleo, Evaluation and Discovery Kits))
Other
869 stars 418 forks source link

Definition of I2C_MEMADD_SIZE_16BIT has an incorrect value #53

Closed armandas closed 3 years ago

armandas commented 3 years ago

Currently, the stm32f4xx_hal_i2c.h has the following definition of I2C_Memory_Address_Size:

/** @defgroup I2C_Memory_Address_Size I2C Memory Address Size
  * @{
  */
#define I2C_MEMADD_SIZE_8BIT            0x00000001U
#define I2C_MEMADD_SIZE_16BIT           0x00000010U
/**
  * @}
  */

The value for 8-bit memory address is 1 (byte) as expected, but the value for 16-bit address is 16. In other repositories this definition has a value of 2.

RKOUSTM commented 3 years ago

Hi @armandas,

Thank you for contribution. According to our development team, the value of the memory address is defined randomly and it will be correctly generated in the HAL .

Please allow me then to close this thread. Thank you for your comprehension and thank you again for your contribution.

With regards