Interfacing ADT7420 with STM32F411 MCU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-07 10:15 PM - last edited on ‎2024-07-08 03:40 AM by mƎALLEm
i'm interfacing ADT7420 with STM32F411.
As per datasheet of ADT7420 the i2c specifications are as follows:
Table 2.
SCL Frequency 0 - 400 kHz
SCL High Pulse Width, tHIGH 0.6 μs
SCL Low Pulse Width, tLOW 1.3 μs
Therefore as per my understanding the i2c all operate in fast mode.
However, my doubt is related to duty cycle, the options available for i2c in stm32f411 are:
Tlow/Thigh=2
or
Tlow/Thigh=16/9
which option i have to use here
My code setting for i2c initilization are as follows
hi2c1.Instance = I2C1;
hi2c1.Init.ClockSpeed = 40000;
hi2c1.Init.DutyCycle = I2C_DUTYCYCLE_2;
hi2c1.Init.OwnAddress1 = 0;
hi2c1.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT;
hi2c1.Init.DualAddressMode = I2C_DUALADDRESS_DISABLE;
hi2c1.Init.OwnAddress2 = 0;
hi2c1.Init.GeneralCallMode = I2C_GENERALCALL_DISABLE;
hi2c1.Init.NoStretchMode = I2C_NOSTRETCH_DISABLE;
regards
- Labels:
-
I2C
-
STM32F4 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-07 10:58 PM - edited ‎2024-07-07 11:01 PM
>which option i have to use here
Try with Tlow/Thigh=16/9 first .
And speed : Init.ClockSpeed = 40000; ? Try standard first, 100 k . 400k is next step...
And enable the noise filter(s) .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-08 10:28 AM
And enable the noise filter(s) .
plz tell me how to enable filters for i2c
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-08 11:45 AM
here analog filter on, + dig.filter : if you wanna use, just set it: 0...15 possible.
