ADE9000: Detect power line frequency

Hi,

My customer want to know that how to set the output frequency to 0 Hz regardless of the state of the SELFREQ bit,

when the power line frequency is less than 40Hz or no power line detectet,

Thanks and regards,

Makio