This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

what does the use of the register I2CEMDR

Hi,everbody:

         when i debug the code of pmbus,the bit of I2CEMDR what i used in the default ,the data transport  fallaciously,in the last i write 0 in the bit of I2CEMDR (bcm),the data transport correctly.how to use the register of the I2CEMDR (bcm)?

  • Hi User,

    BCM is backward compatability mode .   It is pretty well explained in the TRM:

    So if your code needs BCM=0 it just means that it is designed to handle the TXRDY in slave mode the 'new' way.

    Customers who had existing code when the change was made could set BCM to '1' to have the old behavior so that their code could easily be migrated without breaking it.   But I think the new behavior BCM=0 must be advantageous (avoids extra interrupt as described) so if that is how your code needs it to be set you should be in good shape.

  • Hi,Anthony Seely:
    thank you for your reply,sorry,my english is so poor,I can not understand "the I2C is compatible with previous of the I2C," what was the previous of the I2C?
    in my condition,BCM =1, first i configure the AAS, XDRY,RRDY interrupt,when i read a data ,interrupt will be in the process:
    1:Start +address+W (last bit)--->AAS interrupt;
    2:command --->RRDY interrupt
    3:restart +address+R(last bit )---->AAS interrupt:
    4:data ----XDRY interrupt:
    when code is excuting 3: the AAS interrupt is taking place,SDA will occured another data (not in my transport buf ), but the code "I2caRegs.I2CDXR = I2cTxBuf[I2cTxCnt++];"will be in next instruction, I really can not know what happened, in the SDA line ,the data is previous in I2CXSR register?guessed
    my chip is TMS32F28035PNT;
  • Hi Anthony Seely:
    I have a idear,when i set BCM to1 ,the preivous read behavior completed,but the I2caRegs.I2CDXR =0xff; when AAs interrupt comed(address+R(bit)) ,i put data into I2caRegs.I2CDXR, what happened about the I2caRegs.I2CDXR in next XRDY interrupt ?if the next data is invalid ,my problem can be solved .
  • Hi User - you should set BCM to 0 for new work.

    When BCM=1 you can get extra interrupts. BCM=0 fixes a bug. But not everyone wanted that bug fixed because it may mean rework to existing software. So BCM=1 option exists. But do not use it unless you have a reason to use it. If you don't know if you have a reason to use it - you probably do not :)
  • Hi,Anthony Seely:
    though i still do not what is the problem about my code ,but in the experiment, the extra interrupt does not happened in the last transmission,I2C data receive and transmission are ok;
    in the default the bcm set to be 1; i think it should modify ,so user may not suffer unnecessarily trouble.