Using a dual-function pin

MicroController
Posts: 1708
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: Using a dual-function pin

Postby MicroController » Wed Dec 13, 2023 12:34 pm

ok-home wrote:
Wed Dec 13, 2023 3:52 am
If the period is comparable to the freertos tick ( 10 mS ), refuse to use the interrupt at all. The sensor is guaranteed to have time to take measurements.
AFAICT, they recommend to synchronize reads with /INT because otherwise the sensor may update values mid-read, resulting in incorrect readings.

User avatar
ok-home
Posts: 78
Joined: Sun May 02, 2021 7:23 pm
Location: Russia Novosibirsk
Contact:

Re: Using a dual-function pin

Postby ok-home » Wed Dec 13, 2023 3:59 pm

MicroController wrote:
Wed Dec 13, 2023 12:34 pm
AFAICT, they recommend to synchronize reads with /INT because otherwise the sensor may update values mid-read, resulting in incorrect readings.
perfectly acceptable
In the simplest case, periodic read-out of I2C causes a re-run of a new measurement cycle. It only needs to be
ensured that the read-out time is larger than the time for the I2C read frame plus the sensor conversion time.
https://www.infineon.com/dgdl/Infineon- ... 5721903ddd

and if there is a need to connect several sensors on 1 bus I don't see an option to use INT
for one sensor the task can be solved in both polling mode and interrupt mode - depending on what sensor polling speed is needed.

Who is online

Users browsing this forum: No registered users and 100 guests