I'm using ADE7880 and I'm getting AFWATTHR (fundamental active energy) values greater than AWATTHR (total active energy), as AWATTHR includes harmonics that situation shouldn't happen.
This situation arises with several loads and several working settings.
For example for a load of power ~60W cosine ~0.74 I get this values:
AWATTHR = 52
AFWATTHR = 54
To calculate VLEVEL I use this:
Nominal mains voltage = 220V 50Hz
ADC input fullscale = 0x514791 / d5326737 (that would correspond to maximum peak voltage)
peak voltage at ADC input fullscale = 642.55035V
rms voltage at ADC input fullscale = 454.35171V
VLEVEL = 454.35171V/220Vx4000000
VLEVEL = 0x007e0d4c / d8260940
I accumulate for 500ms:
LINECYC = 0x32 / d50
LCYCMODE = 0xe7