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

Flow Diagram

Figure 4-1 depicts the high level flow in the sample code. Throughout the flow the number of devices and their addresses on the FlexWire bus are used. This is specified in files system_info.h and system_info.c and is described in more detail in Section 4.2.

The Setup MCU configures the UART interface and sets it to 750000 bauds. After unlocking the LED driver, it is checked if the animation mode or EEPROM programming mode has been selected. Section 4.2 describes how to change between the modes. During the animation mode, an LED pattern is executed and after completion the diagnostics results are checked. More information about diagnostics can be found in Section 4.3. After the diagnostics, it is checked if the button S2 on the MSP-EXP430F5529LP was pressed. If it was not pressed, the same LED pattern will be executed again. In case it was pressed, the next LED pattern will be executed until all 6 patterns have been executed and the loop will restart from the first pattern again.

During the EEPROM programming mode both buttons S1 and S2 on MSP-EXP430F5529LP are used as well as LED2 to provide feedback to the user. When the non-default EEPROM programming is selected, files eeprom_data.h and eeprom_data.c are used to program the EEPROM. These files can be automatically generated by the EEPROM Configuration Tool mentioned in Section 2. More information about EEPROM programming can be found in Section 4.4.

GUID-20230321-SS0I-GTJS-QPJG-37LKCHNFB819-low.svg Figure 4-1 Sample Code Flow Diagram