JAJU804D August   2022  – December 2022

 

  1.   概要
  2.   リソース
  3.   特長
  4.   アプリケーション
  5.   5
  6. 1System Description
    1. 1.1 Key System Specifications
  7. 2System Overview
    1. 2.1 Block Diagram
    2. 2.2 Design Considerations
      1. 2.2.1 Building Blocks
      2. 2.2.2 Flash Partitioning
      3. 2.2.3 LFU Switchover Concepts
      4. 2.2.4 Application LFU Flow
  8. 3Hardware, Software, Testing Requirements, and Test Results
    1. 3.1 Hardware Requirements
    2. 3.2 Software Requirements
      1. 3.2.1 Software Package Contents
      2. 3.2.2 Software Structure
    3. 3.3 Introduction to the TIDM-DC-DC-BUCK
    4. 3.4 Test Setup
      1. 3.4.1 Loading the Custom Bootloader and Application to Flash using CCS
    5. 3.5 Test Results
      1. 3.5.1 Running the LFU Demo with Control Loop Running on the CPU
      2. 3.5.2 Running the LFU Demo with Control Loop Running on the CLA
      3. 3.5.3 LFU Flow on the CPU
      4. 3.5.4 LFU Flow on the CLA
      5. 3.5.5 Assumptions
      6. 3.5.6 Preparing Firmware for LFU
      7. 3.5.7 LFU Compiler Support
      8. 3.5.8 Robustness
      9. 3.5.9 LFU Use-Cases
  9. 4FOTA Example
    1. 4.1 Abstract
    2. 4.2 Introduction
    3. 4.3 Hardware Requirements
    4. 4.4 Software Requirements
    5. 4.5 Running the example
  10. 5Design and Documentation Support
    1. 5.1 Software Files
    2. 5.2 Documentation Support
    3. 5.3 サポート・リソース
    4. 5.4 Trademarks
  11. 6Terminology
  12. 7About the Author
  13. 8Revision History

Running the LFU Demo with Control Loop Running on the CPU

With both flash banks of the device programmed with the custom bootloader and Application images, the LFU demo is now ready to run in Standalone mode.

  1. Switch to Flash boot mode (it should already be in this mode at this point).
  2. Connect the Booster pack to the Launchpad as shown in Figure 3-4. The Launchpad is above the Boosterpack. Launchpad headers J5-J7 connect to Boosterpack headers H1-H2. Launchpad headers J6-J8 connect to Boosterpack headers H3-H4. This represents Launchpad Site2 in the project, in main.syscfg (Powerstage Parameters – Hardware – Launchpad Site).
    GUID-20201112-CA0I-ZCXB-PFKT-4GXCQL4GK9RH-low.jpg Figure 3-4 Connecting the Booster Pack to the F28004x Launchpad
  3. Connect the banana to bare-wire cables from the DC-bench supply to the Booster pack at JP1 with the correct polarity ([JP1 +]Vin and [JP1 GND]GND).
  4. Set the DC-bench supply to output 9V. Enable Power.
  5. Turn SW1 to the ON position.
  6. Connect an oscilloscope (or similar) to sense the output voltage, as well as 2 additional signals – the ISR CPU load, as well as LFU switchover time. Connections can be made according to the description below. Also use a multi-meter to monitor the regulated output voltage.
    • Output voltage – on header J7 of the Launchpad, signal 67. This represents the regulated output voltage.
    • ISR CPU load - on header J2 of the Launchpad, signal 15. This represents the CPU load of the Control loop ISR.
    • LFU Switchover time - on header J2 of the Launchpad, signal 14. This represents the time taken to perform LFU from the old to the new application image.
  7. Apply power to the board by connecting the micro USB cable to the computer and the Launchpad. Note that it is important for this step to occur after the DC-bench supply is already powering the Booster Pack and SW1 is ON.
  8. This should cause the Control loop ISR to start executing. By default, this will run Build2 of TIDM-DC-DC-BUCK. This is closed-loop voltage regulation using VMC (voltage mode control). However, the background tasks will not yet be executing as the software initialization step is still incomplete. This is the SCI Autobaud lock step. To enable SCI Autobaud lock, execute a command from the Windows command prompt as follows:
    • On F28004x: serial_flash_programmer_appln.exe -d f28004x -k f28004x_fw_upgrade_example\flashapi_ex2_sci_kernel-CPU1-RAM.txt -a buck_F28004x_lfuBANK1FLASH.txt -b 9600 -p COM11
    • On F28003x: serial_flash_programmer_appln.exe -d f28003x -k f28004x_fw_upgrade_example\flashapi_ex2_sci_kernel-CPU1-RAM.txt -a buck_F28003x_lfuBANK1FLASH.txt -b 9600 -p COM11
    • after issuing the command, do not select any option just yet
    • just this much should suffice for SCI autobaud lock, and the Background tasks will start executing. When this happens, sensing operations will commence and the regulated output voltage will show as 1V on the multi-meter (reflective of the 2V regulated output voltage).
    • If there is a Red LED populated on the Booster pack, it will light up.
    • Red LED4 (GPIO23) on the Launchpad is controlled by BUCK_HAL_toggleRunLed() in B1() in buck_main.c. Since this is a background task function, it will start toggling. The toggling frequency is set to a smaller value when the application is running from Bank0 than Bank1.
  9. The programming steps above programmed the TIDM-DC-DC-BUCK application on Flash Bank1 first, then on Flash Bank0. But the firmware versions on both would be 0xFFFE. When they are equal, the bank selection logic in the custom bootloader will deem the lower number bank i.e. Flash Bank0 as the most recent application version, and will execute this.
    • Green LED5 (GPIO34) on the Launchpad is ON when code is running from Bank1, and is OFF when code is running from Bank0. Since code is now running from Bank0, this LED will be OFF.
  10. In Step 8, a command was issued to enable SCI Autobaud lock, and the command prompt was waiting for a user input
    • Enter “8 – Live DFU” – this will program the Bank1_Flash build configuration of the TIDM-DC-DC-BUCK Application to Flash Bank1
    • Enter “0 – Done” when complete
    • While the new image is downloading to Flash, LED4 on the Launchpad will not toggle, because Background tasks are stopped during the image download.
    • After programming the Bank1_Flash image to Flash Bank1, this image will automatically start executing. The user will now notice the following:
      • Green LED5 on the Launchpad is ON . This is because code is now running from Bank1.
      • The Red LED on the Booster pack is still ON. But Red LED4 on the Launchpad is not toggling. This is because the Background tasks are not yet enabled. Similar to above, a command can be issued to enable SCI Autobaud lock. The following command may be used
        • On F28004x: serial_flash_programmer_appln.exe -d f28004x -k f28004x_fw_upgrade_example\flashapi_ex2_sci_kernel-CPU1-RAM.txt -a buck_F28004x_lfuBANK0FLASH.txt -b 9600 -p COM11
        • On F28003x: serial_flash_programmer_appln.exe -d f28003x -k f28004x_fw_upgrade_example\flashapi_ex2_sci_kernel-CPU1-RAM.txt -a buck_F28003x_lfuBANK0FLASH.txt -b 9600 -p COM11
        • after issuing the command, do not select any option just yet
      • Output voltage continues to stay at 1V throughout this process. This is because no device reset was issued after LFU, and the switchover from the old to the new application firmware occurred during the idle time between interrupts.
  11. For the next LFU switchover, the user can set the oscilloscope to trigger on the “LFU switchover time” signal. This will allow the user to visually inspect when the switchover occurs, how long it takes, etc.
    • In step 8, a command was issued to enable SCI Autobaud lock, and the command prompt was waiting for a user input
    • Enter “8 – Live DFU” – this will program the Bank0_Flash build configuration of the TIDM-DC-DC-BUCK Application to Flash Bank0
    • Enter “0 – Done” when complete
    • While the new image is downloading to Flash, LED4 on the Launchpad will not toggle, because Background tasks are stopped during the image download.
    • After programming the Bank0_Flash image to Flash Bank0, this image will automatically start executing. The user will now notice the following:
      • Green LED5 on the Launchpad is OFF. This is because code is now running from Bank0
      • The Red LED on the Booster pack is still ON. But Red LED4 on the Launchpad is not toggling. This is because the Background tasks are not yet enabled. Similar to above, a command can be issued to enable SCI Autobaud lock. The following command may be used
        • On F28004x: serial_flash_programmer_appln.exe -d f28004x -k f28004x_fw_upgrade_example\flashapi_ex2_sci_kernel-CPU1-RAM.txt -a buck_F28004x_lfubank1FLASH.txt -b 9600 -p COM11
        • On F28003x: serial_flash_programmer_appln.exe -d f28003x -k f28004x_fw_upgrade_example\flashapi_ex2_sci_kernel-CPU1-RAM.txt -a buck_F28003x_lfubank1FLASH.txt -b 9600 -p COM11
        • after issuing the command, do not select any option just yet
      • Output voltage continues to stay at 1V throughout this process. This is because no device reset was issued after LFU, and the switchover from the old to the new application firmware occurred during the idle time between interrupts.
      • Refer to Figure 3-5 for details and to visually confirm the above statements. The signals shown are LFU switchover, CPU ISR load, and the regulated output voltage.
      GUID-20201112-CA0I-8W94-7SGW-1LWM4DGNRRR1-low.pngFigure 3-5 LFU Switchover Timing – Control Loop on CPU
  12. Repeat the above steps as needed. When Bank0 is active, issue an LFU command to program and switchover to Bank1. When Bank1 is active, issue an LFU command to program and switchover to Bank0.