You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MC3419 datasheet states, in section 12.5 (0x08) SAMPLE RATE REGISTER that Bit 3 must be written as 1 (note 2: Software must write a one (1).)
Driver file zephyr/drivers/sensor/mc3419/mc3419.h, line 43 specifies a base value for the ODR value of 0x10 ( BIT(4) ). This is then added with the selected ODR value returned by mc3419_get_odr_value(...) in zephyr/drivers/sensor/mc3419/mc3419.c at line 136 to yield the value that will be written to register MC3419_REG_SAMPLE_RATE (0x08).
As hinted to above, that actually sets bit 4, not bit 3, causing the write to silently fail (the write is acknowledged, but the value isn't written because it is invalid).
MC3419 datasheet states, in section 12.5 (0x08) SAMPLE RATE REGISTER that Bit 3 must be written as 1 (note 2:
Software must write a one (1).
)Driver file zephyr/drivers/sensor/mc3419/mc3419.h, line 43 specifies a base value for the ODR value of 0x10 ( BIT(4) ). This is then added with the selected ODR value returned by mc3419_get_odr_value(...) in zephyr/drivers/sensor/mc3419/mc3419.c at line 136 to yield the value that will be written to register MC3419_REG_SAMPLE_RATE (0x08).
As hinted to above, that actually sets bit 4, not bit 3, causing the write to silently fail (the write is acknowledged, but the value isn't written because it is invalid).
This bug was found on the following release:
commit 36940db (HEAD, tag: v3.7.0, manifest-rev)
Author: Alberto Escolar Piedras alberto.escolar.piedras@nordicsemi.no
Date: Thu Jul 18 10:13:57 2024 +0200
The text was updated successfully, but these errors were encountered: