SNVU854 april   2023 TPS929120-Q1 , TPS929121-Q1 , TPS929160-Q1 , TPS929240-Q1

 

  1.   Abstract
  2.   Trademarks
  3. 1Introduction
  4. 2Software Setup
  5. 3Hardware Setup
  6. 4Sample Code Structure
    1. 4.1 Flow Diagram
    2. 4.2 System Setup
    3. 4.3 Diagnostics
    4. 4.4 EEPROM Programming

EEPROM Programming

The sample code includes the capability to program the EEPROM. This capability is enabled by macros defined in file system_info.h.

// When set to 1, the EEPROM programming routine is executed instead of normal program
#define PROG_EEPROM                  (FALSE)
// When set to 1, program the EEPROM to the default value
#define PROG_DEFAULT_EEPROM          (FALSE)
// Use external device address settings for EEPROM programming
#define USE_REF_PIN_FOR_EEPROM_PROG  (FALSE)

When macro PROG_EEPROM is defined as TRUE, the EEPROM programming mode is enabled. The sample code can program the default EEPROM values for the specified LED driver IC or a custom setting. The custom setting is programmed when macro PROG_DEFAULT_EEPROM is defined as FALSE. This setting is specified in files eeprom_data.h and eeprom_data.c. These files can be automatically generated by the EEPROM Configuration Tool as mentioned in Section 2.

The LED driver IC supports two solutions for individual chip selection through pulling the REF pin high or through device address configuration by address pin. When macro USE_REF_PIN_FOR_EEPROM_PROG is defined as TRUE, the REF pin should be pulled high during programmed. When it is defined as FALSE, the current device address is used. TI recommends to use the current device address.

When the code enters the EEPROM programming routine, it turns on LED2 (P4.7) on the MSP-EXP430F5529LP. When macro USE_REF_PIN_FOR_EEPROM_PROG is defined as TRUE, the REF pin should be pulled up after the LED2 turns on. The jumper required to pull up the REF-pin for each EVM is listed in Table 4-2.

After LED2 turns on, button S1 on MSP-EXP430F5529LP should be pressed to start the programming. When the current device address is used, LED2 will turn off once the programming is finished.

When the REF pin is used, LED2 starts to blink after programming is finished. At that time, the pull up on the REF pin should be removed and afterwords the button S2 on MSP-EXP430F5529LP should be pressed. Then LED2 will turn off.

Table 4-2 EVM Jumper to be Set When Using REF Pin During EEPROM Programming
EVM Jumper
TPS929120EVM J2 position 2 and 3 (+5V)
TPS929160EVM J52 position 2 and 3 (VLDO)
TPS929240EVM J10 position 2 and 3 (VLDO)