This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

PEC problem

I have recently changed my interrupt routines to use the 'using RB_LEVELx' format. This seems to have caused a problem which crashes the I2C module. I have tracked the source to a line of code executed in the EOP interrupt routine. I use the ADC with PEC and at the end of each full conversion cycle the PEC control register needs to be reloaded for the next cycle. Its that line of code which seems to crash the I2C module!

As i say this only became apparent after all interrupts where modified to use reg banks. If i comment out the PEC reload code the problem is solved!

Has anyone had any experience with PEC problems or anything that may help.

Parents Reply Children