stm32-ds3231 icon indicating copy to clipboard operation
stm32-ds3231 copied to clipboard

Mask error in DS3231_Enable32kHzOutput function ?

Open SumantKhalate opened this issue 2 years ago • 0 comments

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;

SumantKhalate avatar Apr 06 '23 13:04 SumantKhalate