Oznog
Active Member
I have PIC18 with the C0 revision. There is a known errata sheet which says there was a bug where the BufferFull flag could clear accidentally, leaving the I2C code stalled.
I think I'm seeing it in practice. The bus gets frozen, and I know it's in the slave, since I can reset the master and it remains frozen. The system was designed so that the slave goes to sleep when there are no I2C requests (possibly for weeks), so unfortunately there's no way to discerne when the master has no requests if the bug happens at the start of pkt. If it happens during the pkt, I could do a timeout, but this isn't always the case.
Any ideas? My only idea now is to change SLEEP to a specific write command, but I didn't implement the I2C write functionality on either the master or slave and would rather not develop & verify it for just this single command. Could I read the SCK, SDI pins once the I2C bus times out to determine if it's a case of a bug & a stuck bus rather than an proper case of an idle I2C bus?
Why the hell did Microchip let such a crappy part out? This was already their "fix" for the B-revision.
I think I'm seeing it in practice. The bus gets frozen, and I know it's in the slave, since I can reset the master and it remains frozen. The system was designed so that the slave goes to sleep when there are no I2C requests (possibly for weeks), so unfortunately there's no way to discerne when the master has no requests if the bug happens at the start of pkt. If it happens during the pkt, I could do a timeout, but this isn't always the case.
Any ideas? My only idea now is to change SLEEP to a specific write command, but I didn't implement the I2C write functionality on either the master or slave and would rather not develop & verify it for just this single command. Could I read the SCK, SDI pins once the I2C bus times out to determine if it's a case of a bug & a stuck bus rather than an proper case of an idle I2C bus?
Why the hell did Microchip let such a crappy part out? This was already their "fix" for the B-revision.