Comunicación SPI ATM9E32AS Energy Meter

This project uses the ESP32 to talk SPI to that energy IC and is opensource. You might want to check out the source here for any tips.

The creator also hangs out in this forum a bit too, so might be able to help.