I am designing a power meter based on ADE7758 and I'm using the official documentation for examples; I will also use an isolating IC for the communication between the ADE7758 and the microcontroller. I have some trouble understanding why is the ground of the +5V supply referenced to the neutral line in the diagram below:
The diagram is adapted from page 12 of AN-564 Application Note of Analog Devices and depicts a power supply design for a power meter.
The ADE7758 datasheet sheds some light on connection between digital and analog grounds, saying that these should be connected at only one point (page 9). What bothers me is that the voltage regulator's ground is supposed to be 0V for the digital circuitry, while the neutral rail may not be a good reference. I have not tested the circuit and before I go ahead and do that I would like to wrap my head around its working principle.
My other concern is what will happen if someone swaps the hot and neutral connections of the board; the microcontroller reference will be connected the the hot line and I want to avoid that.