Re: Cannot set i2c scl clock frequency
a) What Versions: Harmony, MHC, XC32, etc. (Always post this as affects answers)
b) Did you configure I2C with MHC, or your own code?
c) Did you base your code on any examples? which?
d) If using HarmonyV2.0X then see [MHC_CreatingProjectWithoutBSP_v00PR.txt], the last section about generating example code in MHC and comparing/extracting required bits is important. Possibly you are missing a bit of code so something isn't being consistently initialized (Default may work at 70KHz but not at higher).
e) Do a compare between project at 70KHz and one at higher rate, and ensure that only the expected items are being changed in generated code. (a) copy project to a separate backup folder (b) change datarate & generate (c) compare copied and changed projects, possibly using beyond compare. MHC has on occasion generated false code due to bug.
f) Create project fresh. MHC doesn't always change things properly. In past I had issues with MHC left over code when changed MHC settings.
*If you find an MHC bug submit a ticket.