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.

LAUNCHXL-F280049C: About some PMBus registers

Part Number: LAUNCHXL-F280049C
Other Parts Discussed in Thread: C2000WARE

Hi,

   1). How to use PMBCTRL.FAST_MODE bit?  If I want to below 100KHz, must I reset PMBCTRL.FAST_MODE = 0? And meanwhile shall I  cooperate with the following registers?

* PMBTIMCLK
* PMBTIMSTSETUP
* PMBTIMBIDLE
* PMBTIMLOWTIMOUT
* PMBTIMHIGHTIMOUT

  2).  How to use PMBCTRL.SCL_DIR  bit? If I want to Master, will I set SCL_DIR? Or if I want to slave, will I reset SCL_DIR?

  3). How to use PMBCTRL.SCL_VALUE bit? Will I configure GPIO register to GPIO mode? And is the pin output mode or input mode?

  4).How to use PMBCTRL.SCL_MODE bit? If I want to use PMBus, will I reset SCL_MODE=0 ? If I set  SCL_MODE=1, how can it execute "PMBus clock pin configured as GPIO" ?

  5).If I set PMBCTRL.I2CMODE=1, what functions of I2C can be used?

  • Lei Li,

    1). How to use PMBCTRL.FAST_MODE bit?  If I want to below 100KHz, must I reset PMBCTRL.FAST_MODE = 0? And meanwhile shall I  cooperate with the following registers?

    Please check PMBus_configBusClock function defined in pmbus.c driverlib function. This function explains how you need to configure the registers.

    Path: <C2000Ware>\driverlib\f2838x\driverlib

    File: pmbus.c

    2).  How to use PMBCTRL.SCL_DIR  bit? If I want to Master, will I set SCL_DIR? Or if I want to slave, will I reset SCL_DIR?

     

    3). How to use PMBCTRL.SCL_VALUE bit? Will I configure GPIO register to GPIO mode? And is the pin output mode or input mode?

      4).How to use PMBCTRL.SCL_MODE bit? If I want to use PMBus, will I reset SCL_MODE=0 ? If I set  SCL_MODE=1, how can it execute "PMBus clock pin configured as GPIO" ?

    Master mode is enabled by setting PMBCTRL.MASTER_EN = 1.

    You don't need to worry about SCL_DIR, SCL_VALUE, SCL_MODE when you have PMBus peripheral controlling GPIOs.These are useful only when you don't want PMBus peripheral to control the PMBus pins.

    5).If I set PMBCTRL.I2CMODE=1, what functions of I2C can be used?

    PMBus inherently is build on I2C protocol. When this functionality is enabled, you can use PMBus as I2C module. What specific functionality are you looking for?

    When I2C mode is enabled, the only effect is to remove the automatic insertion of number of bytes in block writes in master mode. (this automatic insertion of number of bytes is PMBus requirement and not I2C)

    Regards,

    Manoj

  • Hi,

    You don't need to worry about SCL_DIR, SCL_VALUE, SCL_MODE when you have PMBus peripheral controlling GPIOs.These are useful only when you don't want PMBus peripheral to control the PMBus pins.

          1).According to your reply, if I want to use PMBus function, I need not to configure these bits.  Is that so? But how to configure SCL_DIR bit (according to the "TRM",the bit belong to PMBus function)?

          2).If I want to use GPIO function, such as GPIO3, I know that I must configure GPIO register first.  And must I set 

    SCL_MODE=1? And how to configure SCL_VALUE bit ?

       

    What specific functionality are you looking for?

        I only want to know how to use the I2C mode.  According to your reply "When I2C mode is enabled, the only effect is to remove the automatic insertion of number of bytes in block writes in master mode. "

      1). If the PMBus module is in block read in slave mode with I2C mode, will it also remove the automatic insertion of number of bytes?

       Thanks!

      

  • Yes, thats correct. We already have a example of using PMBus as I2C to read EEPROM available in C2000Ware.

    Path: <C2000Ware>\libraries\communications\PMBus\c28\examples\

    Example: 28004x_pmbus_i2c_eeprom

  • Hi,

       Thanks for your reply!

    When I2C mode is enabled, the only effect is to remove the automatic insertion of number of bytes in block writes in master mode. (this automatic insertion of number of bytes is PMBus requirement and not I2C)

       According to your reply, is there no block write mode when I2C mode is enabled? Otherwise, how can the master get the number of bytes which were transmited in I2C mode?

          Thanks!

  • Block write protocol is specific to PMBus / SMBus and not a standard in I2C. If you want to use block write, please use PMBus mode.

    Regards,

    Manoj