Re: PIC32MZ and MCP4728 : I2C stuck!
What exact PIC32MZ?????? device type is beeing used,
and what hardware silicon revision is the PIC32MZ device that is used for development and testing?
The reason for this question, is that some revisions of PIC32MZ devices have hardware Errata
that may cause I2C communication to get stuck.
Hardware revision of the microcontroller is reported by MPLAB X when communication is established,
before programming or a debug session is started.
Read the Errata document for the PIC device type beeing used,
to see what applies to the hardware revision of the device in use.