I'm working on a project that is using ACS37800 for measuring current and voltage and for detecting zero-crossing.
However, there is some issues with the timing as the zero-crossing detection is off.
The ACS37800 has been setup with the squarewave_en so that it toggles the zero-detection pin signal each time it detect a zero-crossing. However as can be seen on the attached image, the signal is toggled almost a 1 ms before the actual zero-crossing.
I might have missed something, but I do not see anything in the datasheet that can explain this.
I would appreciate if anyone have an idea for what could cause this issue.
Datasheet: https://www.allegromicro.com/-/media/files/datasheets/acs37800-datasheet.ashx

 
    