The MCx8xx family of integrated motor drivers contains registers and on-board EEPROM that can be interfaced and programmed using an external MCU such as a MSP430 over I2C.
This FAQ provides an example CCS firmware project and instructions to use the MSP-EXP430FR2355 LaunchPad to communicate and program the MCF8316A.
Firmware Project Description
This firmware will program hard-coded EEPROM register settings into the MCF8316A using the MSP-EXP430FR2355.
When the S1 side button on the MSP-EXP430FR2355 LaunchPad is pressed, the LaunchPad will write all the register settings configured in the firmware source code into the MCF8316A, then send an EEPROM write command to trigger the MCF8316A to store the settings into its EEPROM memory.
Afterwards, the LaunchPad will read back the EEPROM settings and verify whether the EEPROM register write was successful, indicated by the Red (fail) and Green (success) LED1 or LED2 on the LaunchPad.
The project consists of a single file – main.c
Hardware Connections
Signal |
MSP-EXP430FR2355 |
MCF8316A Board |
I2C SDA |
P4.6 |
SDA |
I2C SCL |
P4.7 |
SCL |
GND |
GND |
AGND |
The example image here shows connection between the MSP-EXP430FR2355 LaunchPad and the MCF8316AEVM. But the MCF8316AEVM can be replaced with any custom PCB as long as SDA, SCL, and AGND are available.
Running the CCS Project
- Download the CCS project and extract into a folder: 2273.EEPROM_Program_MCF8316A_MSP-EXP430FR2355.zip
- Navigate to https://dev.ti.com/ide in your web browser and import the CCS project.
- Open main.c and modify the eeprom_regmap array to your desired settings:
- Build and download the code onto the MSP-EXP430FR2355 LaunchPad
Program Other MCx Devices
The same I2C commands can be used to program other MCx devices, such as MCT8316A, MCF8315A, MCT8315A, MCT8329A, etc.
- Please ensure that the I2C_TARGET_ADDR is set to match the corresponding address configured in the MCx target device.
- Make sure the eeprom_array_size variable and the eeprom_regmap[] array are updated to match the size and content of the desired MCx device