Can I safely disable BOD during sleep on Atmega328P?

Hi,

I plan to use Atmega328P in product where the device is running on a pair of AA cells and sleeping most of the time.

I am leaving BOD enabled in fuse bits, but to save power, I intend to disable BOD before going to sleep. As per datasheet, BOD is needed for flash and EEPROM corruption prevention. However, I am never going to write to flash and I can detect battery voltage via a pin and avoid writing to EEPROM (my app does write to EEPROM) if voltage is lower.

During sleep state the voltage would fall very slowly and the brown out condition will not arise. During the active state the voltage will fall faster, if brown out occurs, since BOD is active, it will reset the processor and the system will never boot now till the batteries are replaced leaving the EEPROM contents intact.

Is there any way flash can get corrupted in this scenario?

Also before going to sleep if I disable BOD then what happens if reset is pressed (without removing power), is BOD active or not ?

Thanks and Regards,
WonderfulIOT

Have you seen this for a comprehensive description of ATMEGA328P power saving strategies including Brown Out etc. Gammon Forum : Electronics : Microprocessors : Power saving techniques for microprocessors

Read section 10.2 of the datasheet!

"If BOD is disabled in software, the BOD function is turned off immediately after entering the sleep mode. Upon wake-up from sleep, BOD is automatically enabled again. This ensures safe operation in case the VCC level has dropped during the sleep period.
When the BOD has been disabled, the wake-up time from sleep mode will be approximately 60 μs to ensure that the BOD is working correctly before the MCU continues executing code.