Skip to content

Fix config register byte order#19

Merged
jerrysxie merged 1 commit intoOpenDevicePartnership:mainfrom
kurtjd:fix-default-config
Jun 19, 2025
Merged

Fix config register byte order#19
jerrysxie merged 1 commit intoOpenDevicePartnership:mainfrom
kurtjd:fix-default-config

Conversation

@kurtjd
Copy link
Contributor

@kurtjd kurtjd commented Jun 14, 2025

The driver currently assumes byte 1 of the config register is the LSB and byte 2 is the MSB. This PR changes it to the correct order (byte 1 is MSB, byte 2 is LSB).

This was discovered after writing Config::default() to a TMP108 device. The device was not returning fresh temperature samples during periodic polling. Likely the device was in shutdown mode since the current default value written would be 0x1022 which would cause M1 and M0 bits to be set to 0b00 (shutdown mode).

This fix thus changes the default value to 0x2210 which makes the device operate as expected.

@kurtjd kurtjd requested a review from a team as a code owner June 14, 2025 18:48
@kurtjd kurtjd self-assigned this Jun 14, 2025
@kurtjd kurtjd added the bug Something isn't working label Jun 14, 2025
@kurtjd kurtjd moved this to In review in Embedded Controller Jun 14, 2025
@kurtjd kurtjd requested a review from felipebalbi June 14, 2025 18:49
@jerrysxie jerrysxie merged commit 563671c into OpenDevicePartnership:main Jun 19, 2025
12 checks passed
@github-project-automation github-project-automation bot moved this from In review to Done in Embedded Controller Jun 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants