missing i2c register definition stm32f405

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, tfAteba

Post Reply
krid
Posts: 5
Joined: Tue Nov 24, 2020 11:39 am
Has thanked: 1 time
Been thanked: 1 time

missing i2c register definition stm32f405

Post by krid »

Hello,

in the latest stable (21.11.1 from https://osdn.net/projects/chibios/releases/76266) I am missing the I2C Filter definitions in os\common\ext\ST\STM32F4xx\stm32f405xx.h

In comparison to the F429 the missing part is:

Code: Select all

/******************  Bit definition for I2C_FLTR register  *******************/
#define I2C_FLTR_DNF_Pos          (0U)                                         
#define I2C_FLTR_DNF_Msk          (0xFU << I2C_FLTR_DNF_Pos)                   /*!< 0x0000000F */
#define I2C_FLTR_DNF              I2C_FLTR_DNF_Msk                             /*!<Digital Noise Filter */
#define I2C_FLTR_ANOFF_Pos        (4U)                                         
#define I2C_FLTR_ANOFF_Msk        (0x1U << I2C_FLTR_ANOFF_Pos)                 /*!< 0x00000010 */
#define I2C_FLTR_ANOFF            I2C_FLTR_ANOFF_Msk                           /*!<Analog Noise Filter OFF */


The FLTR-register is missing in the I2C_TypeDef, too.

Code: Select all

typedef struct
{
  __IO uint32_t CR1;        /*!< I2C Control register 1,     Address offset: 0x00 */
  __IO uint32_t CR2;        /*!< I2C Control register 2,     Address offset: 0x04 */
  __IO uint32_t OAR1;       /*!< I2C Own address register 1, Address offset: 0x08 */
  __IO uint32_t OAR2;       /*!< I2C Own address register 2, Address offset: 0x0C */
  __IO uint32_t DR;         /*!< I2C Data register,          Address offset: 0x10 */
  __IO uint32_t SR1;        /*!< I2C Status register 1,      Address offset: 0x14 */
  __IO uint32_t SR2;        /*!< I2C Status register 2,      Address offset: 0x18 */
  __IO uint32_t CCR;        /*!< I2C Clock control register, Address offset: 0x1C */
  __IO uint32_t TRISE;      /*!< I2C TRISE register,         Address offset: 0x20 */

} I2C_TypeDef;

Can someone confirm that?

Thanks.
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: missing i2c register definition stm32f405

Post by Giovanni »

Hi,

Are those bits actually present on the device? there must be a reason why ST removed those definitions from that specific header.

Giovanni
krid
Posts: 5
Joined: Tue Nov 24, 2020 11:39 am
Has thanked: 1 time
Been thanked: 1 time

Re: missing i2c register definition stm32f405

Post by krid »

Hi,
at last I found a note (37.1.1) in UM1725 (hal and ll driver description) which says that the analog and digital filters are available in the 427/437, 429/439 cpus as an additional feature. Previous devices don't include the filter ability. By that I had a look at the RM00900 again and :shock: I simply overread the part "The I2C_FLTR is available on STM32F42xxx and STM32F43xxx only." in RM0090 29.6.10.

So hopefully this entry helps another blind man to see.
Post Reply