Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mask error in DS3231_Enable32kHzOutput function ? #1

Open
SumantKhalate opened this issue Apr 6, 2023 · 0 comments
Open

Mask error in DS3231_Enable32kHzOutput function ? #1

SumantKhalate opened this issue Apr 6, 2023 · 0 comments

Comments

@SumantKhalate
Copy link

https://github.com/eepj/DS3231_for_STM32_HAL/blob/054d5f689080ce896b9baa02df1c712f9e189ff8/ds3231_for_stm32_hal.c#L438

Shouldn't the mask be 0xF7 instead of 0xFB as EN32kHz is bit 3?

uint8_t status = DS3231_GetRegByte(DS3231_REG_STATUS) & 0xfb;

should have been
uint8_t status = DS3231_GetRegByte(DS3231_REG_STATUS) & 0xf7;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant