Skip to content

INT/SQW pin stays LOW following triggered alarm #17

@adgsm

Description

@adgsm

Once alarm is triggered method DS3231::turnOffAlarm(byte Alarm) does not reset A1F / A2F bits in status register 0x0F. This makes SQW pin stay LOW and thus making following interrupts impossible.

Simple solution would be to add following codes at the end of the method to modify status byte as well.

	// clear A1F/A2F flags for previously set alarms
	temp_buffer = readControlByte(1);
	// modify status byte
	if (Alarm == 1) {
		temp_buffer = temp_buffer & 0b11111110;
	} else {
		temp_buffer = temp_buffer & 0b11111101;
	}
	writeControlByte(temp_buffer, 1);

Thanks for the library!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions