Re: I2C for PIC32MZ in HarmonyV20501
Sorry for posting in an old thread, but I am suffering exactly the same issue as described by Paul, but in a different PIC and Harmony Version.
In my case:
The problem only appears on reading operations when I2C frequency is closer to 400kHz. No matter if Slew Rate Control is enabled or not. All the I2C buses of the PIC are affected.
Harmony I2C stack get stuck after reading external devices like I2C eeproms, RTCs, or other PICs in salve role.
As Paul said:
- DRV_I2C_TransferStatusGet() returning continuous DRV_I2C_BUFFER_MASTER_ACK_SEND
- I2C vSDA was held low
Lowering freq. to for example 300kHz solves the problem.
Enabling BitBang also solves the problem, but max freq is about 100kHz
Se attached screen capture from scope.
Please note the 9h pulse of the clock signal on write operations.
I think I2C harmony takes so long in generating ACK condition that diver get stuck.
The 9th pulse on read operations look fine.
Any suggestion will be appreciated.