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

I2C Comms Interruptable?

Further in the series of dumb questions I am too embarrased to identify myself as having publicly asked, is the following:

Should my boiler plate bit-banger I2C C code be able to be temporarily interrupted by other tasks at any point during communication?

Does the I2C standard permit brief pauses in bus activity, whilst the processor attends to more pressing duties?

Boz.

Parents
  • Certainly. But don't you have a peripheral to do it for you...?

    Certainly, there are peripherals that can do this, but on some micros they are worse than useless (cough STM32 cough).

    The I2C spec states no minimum clock frequency (in fact, if I remember correctly, it states DC to MAXFREQ), so provided you don't glitch the I/O lines during your ISRs, then there should be no problem whatsoever.

Reply
  • Certainly. But don't you have a peripheral to do it for you...?

    Certainly, there are peripherals that can do this, but on some micros they are worse than useless (cough STM32 cough).

    The I2C spec states no minimum clock frequency (in fact, if I remember correctly, it states DC to MAXFREQ), so provided you don't glitch the I/O lines during your ISRs, then there should be no problem whatsoever.

Children
No data