I am working on a project where I have an I2C slave application running on a PIC16F1829. I am finding that because the ISR must read the slave address, wait for a new byte, then read that byte, that very occasionally the bus will hang due to the micro being stuck in the ISR.
I've tried to enable the watchdog to counter this behavior, but it doesn't seem to have been done correctly. I've tried #pragma config WDTE = ON to enable the watchdog followed by setting up the period and enabling the SWDTEN bit, but this doesn't seem to do the trick. In the documentation, it's mentioned that the WDT fuses have four possible settings, so the presence of just ON and OFF for the fuse setting is making me suspicious.
Does anyone have any additional insights on what I'm doing incorrectly?