Alarm time settings on a DS3231

which flash memory? If I remember correctly, the DS3231 just has Time keeping Registers which needs power.

ebolisa:
but if turned off, the settings are lost

so... are you sure the battery is fine?