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.

TMS320F28069: Best strategy to operate as master and slave

Part Number: TMS320F28069
Other Parts Discussed in Thread: CONTROLSUITE, C2000WARE

Hello,

I currently have a TMS320F28069 microcontroller with the following peripherals on an I2C bus:

1) an external EEPROM

2) A different MSP430 microcontroller 

I would like for the F28069 to act as a master to the EEPROM to store data, but I want the F28069 to act as a slave to the MSP430--such that the external MSP430 can issue commands to the F28069. The F28069 will be acting as a speed controller with the MSP430 acting as safety device to issue quick commands to slow down the speed controller in unsafe conditions. Presently, I am only using the GPIO 32 and GPIO 33 for SDA and SCL connections on the F28069. I have successfully implemented the i2c_eeprom example in C:\ti\controlSUITE\device_support\f2806x\v151\F2806x_examples_ccsv5\i2c_eeprom, but I am unsure how to best scale to the next step and have the F28069 act as a master and a slave simultaneously.

Are there applicable F28069 or C2000 example scripts that are best suited as a reference here?

Thanks

J

  • Hi J,

    but I am unsure how to best scale to the next step and have the F28069 act as a master and a slave simultaneously.

    This isn't possible. You would have to switch between master/slave mode in software.

    By the way, we do have some newer I2C examples in C2000WARE you may prefer over the older one in ControlSUITE. The software should be more straightforward to utilize.

    Directory locations of polling/interrupt method examples below:

    C:\ti\c2000\C2000Ware_4_01_00_00\device_support\f2806x\examples\c28\i2c_Lib_eeprom_polling

    C:\ti\c2000\C2000Ware_4_01_00_00\device_support\f2806x\examples\c28\i2c_Lib_eeprom_interrupt

    Best,

    Kevin

  • This is excellent. Are there any examples with setting a C2000 or similar controller to slave mode and performing slave I2C operations?

  • Hi J,

    Not for F2806x device unfortunately.

    We do have a 'i2c_ex5_master_slave_interrupt' example for F2837x device in C2000WARE, however it uses DriverLib functions which are different than bit-field software. This example may still be useful however, since the I2C modules between the devices are the same. So the behavior and methodology should be relevant, would just need to replicate with bit-field SW.

    C:\ti\c2000\C2000Ware_4_01_00_00\driverlib\f2837xd\examples\cpu1\i2c

    Best,

    Kevin