AnsweredAssumed Answered

BF548, I2C / TWI Master Bus does not send anything

Question asked by MrDr83 on Jun 8, 2011
Latest reply on Jun 8, 2011 by MrDr83

Hi all,


I have problems with the I2C Master on my BF548M. I coded a implementation of the TWI via register-access and this code works fine on a other system with the BF548, but on my new system the SCLK and the SDATA pins are not driven by the CPU.

I tried to change clocking and timing of the TWI and CPU but I'm not able to get the TWI / I2C running.


Here is the function, where the cpu waits for the transmitted byte in the fifo (address of slave) but data in the fifo is never transmitted.


static BYTE I2CDoTransmitFifo (TWI_IFC pTwi)
  while (!cErr && (*(pTwi+TWI_FIFO_STAT_REG) & XMTSTAT))    // wait until transmit FIFO is empty
    cErr = I2CDoCheckForNak(pTwi);
  return cErr;



Is there a mechanism that the master does not write on a busy bus? Or what can be the reason that the fifo is never transmitted?


I hope someone can help me.


Thanks a lot!