chipKIT® Development Platform

Inspired by Arduino™

I2C causes CoreTimerInterrupt problem on Wifire

Created Thu, 28 Jul 2016 15:35:32 +0000 by shirleyc


shirleyc

Thu, 28 Jul 2016 15:35:32 +0000

Hi, I'm using the CoreTimerInterrupt (see snippet of code posted with under Multi-Platform IDE with topic "3 IDEs have different timings for core timer service callback; also service stops!") with Digilent Wifire or uC32 boards and their Analog Shield that runs under SPI. I managed to fix my earlier problems. Now everything works fine on uC32, but when I use the Wifire and add an I2C device (4 line x 20 char display that uses Wire and LiquidCrystal_I2C libraries), then the core timer interrupts stop after a few seconds. Via a keystroke, I can then turn the core timer interrupts off and then back on, and then they work again for a few seconds and then stop again. This procedure can be repeated. If I disconnect the I2C device, the interrupts don't stop randomly but continue without fail. Also, no such problems occur with the uC32 board; the interrupts also happily continue. I read that I2C also uses interrupts but at priority 3, whereas CoreTimer interrupt is priority 7. Since I thought this meant that the CoreTimer Interrupts would always trump the I2C interrupts, why would they stop? Is there a problem with the Wire library and the Wifire board? Or is the much higher speed of the Wifire causing the problem? Looking with a logic analyzer, it appears there is continuous traffic on the SCL and SDA lines. The code is currently fairly stupid and refreshes the I2C LCD display every time it goes through loop. I could certainly change it so that it only updates if there is a change to the information to be displayed. Would that be likely to help? --Shirley


Jacob Christ

Thu, 25 Aug 2016 06:38:08 +0000

Shirley,

We have been using I2C with ADC on a WiFire this last week and are seeing the board lock up. I don't know if it is related. Both work fine by themselfs but together boom. If I figure something out I'll post it here.

Jacob