My board works intermittently... when I short some pins
Ah! I think I fixed it!

And I learned some things about my MCU in the process.

I2C is not working properly because of a chip errata. Item 10.

Module: I2C™ (I2C1, SDA Line State)

When using I2C1, the SDA1 line state may not be
detected properly unless it is first held low for
150 ns after enabling the I2C module.

In Master mode, this error may cause a bus collision
to occur instead of a Start bit transmission.
Transmissions after the SDA1 pin has been held
low will occur correctly.

In Slave mode, the device may not Acknowledge
the first packet sent after enabling the I2C module.
In this case, it will return a NACK instead of an
ACK. The device will correctly respond to packets
after detecting a low level on the line for 150 ns.

The I2C2 module operates as expected and does
not exhibit this issue.


This explains why the screwdriver trick works. I was shorting SDA to Vss when I ran the screwdriver along the pins, which allowed the module to start correctly. It only affects A3/A4 silicon.