mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-25 19:56:30 +00:00
parent
eb798df249
commit
a0f59ef2ec
@ -476,6 +476,7 @@ void Ade7880Cycle(void) {
|
|||||||
#endif // ADE7880_PROFILING
|
#endif // ADE7880_PROFILING
|
||||||
|
|
||||||
uint32_t status0 = Ade7880ReadVerify(ADE7880_STATUS0); // 0xE502 - 0x000FEFE0
|
uint32_t status0 = Ade7880ReadVerify(ADE7880_STATUS0); // 0xE502 - 0x000FEFE0
|
||||||
|
/*
|
||||||
if (!bitRead(status0, 5)) { // LENERGY
|
if (!bitRead(status0, 5)) { // LENERGY
|
||||||
AddLog(LOG_LEVEL_DEBUG, PSTR("A78: Unexpected ISR0 0x%08X"), status0);
|
AddLog(LOG_LEVEL_DEBUG, PSTR("A78: Unexpected ISR0 0x%08X"), status0);
|
||||||
return;
|
return;
|
||||||
@ -483,6 +484,13 @@ void Ade7880Cycle(void) {
|
|||||||
Ade7880WriteVerify(ADE7880_STATUS0, 0x00000020); // 0xE502 - Acknowledge LENERGY - Reset IRQ0 line
|
Ade7880WriteVerify(ADE7880_STATUS0, 0x00000020); // 0xE502 - Acknowledge LENERGY - Reset IRQ0 line
|
||||||
status0 = Ade7880ReadVerify(ADE7880_STATUS0); // 0xE502 - 0x000FEFC0
|
status0 = Ade7880ReadVerify(ADE7880_STATUS0); // 0xE502 - 0x000FEFC0
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
if (!bitRead(status0, 5)) { // LENERGY
|
||||||
|
AddLog(LOG_LEVEL_DEBUG, PSTR("A78: Unexpected ISR0 0x%08X"), status0);
|
||||||
|
}
|
||||||
|
Ade7880WriteVerify(ADE7880_STATUS0, 0x00000020); // 0xE502 - Acknowledge LENERGY - Reset IRQ0 line
|
||||||
|
status0 = Ade7880ReadVerify(ADE7880_STATUS0); // 0xE502 - 0x000FEFC0
|
||||||
|
|
||||||
if (Ade7880.cycle_count) { // Allow calibration stabilization
|
if (Ade7880.cycle_count) { // Allow calibration stabilization
|
||||||
Ade7880.cycle_count--;
|
Ade7880.cycle_count--;
|
||||||
return; // Skip first cycles
|
return; // Skip first cycles
|
||||||
|
Loading…
x
Reference in New Issue
Block a user