Skip to content

Mask error in DS3231_Enable32kHzOutput function ? #1

@SumantKhalate

Description

@SumantKhalate

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions