SPRUHW1A June   2014  – October 2021 TMS320F28052-Q1 , TMS320F28052M , TMS320F28052M-Q1 , TMS320F28054-Q1 , TMS320F28054M , TMS320F28054M-Q1

 

  1. 1Read This First
    1. 1.1 About This Manual
    2. 1.1 Glossary
    3. 1.1 Support Resources
    4.     Trademarks
  2. 1 F2805xM InstaSPIN-MOTION Enabled MCUs
  3. 2InstaSPIN-MOTION Key Capabilities and Benefits
    1. 2.1 Overview
    2. 2.2 FAST Unified Observer
    3. 2.3 SpinTAC Motion Control Suite
      1.      IDENTIFY
      2.      CONTROL
      3.      MOVE
      4.      PLAN
    4. 2.4 Additional InstaSPIN-MOTION Features
  4. 3InstaSPIN-MOTION Block Diagrams
    1.     Scenario 1: InstaSPIN-MOTION Speed Control with FAST Software Encoder
    2.     Scenario 2: InstaSPIN-MOTION Speed Control with a Mechanical Sensor
    3.     Scenario 3: InstaSPIN-MOTION Position Control with Mechanical Sensor and Redundant FAST Software Sensor
  5. 4Application Examples
    1. 4.1 Treadmill Conveyor: Smooth Motion Across Varying Speeds and Loads
    2. 4.2 Video Camera: Smooth Motion and Position Accuracy at Low Speeds
    3. 4.3 Washing Machine: Smooth Motion and Position Accuracy at Low Speeds
      1.      Agitation Cycle
      2.      Spin Cycles
    4. 4.4 InstaSPIN-MOTION Works Over the Entire Operating Range
  6. 5Evaluating InstaSPIN-MOTION Performance
    1. 5.1 Overview
    2. 5.2 Velocity Control Performance: SpinTAC vs PI
      1. 5.2.1 Disturbance Rejection
      2. 5.2.2 Reference Tracking
      3. 5.2.3 Step Response
    3. 5.3 Position Control Performance: SpinTAC vs PI
      1. 5.3.1 Disturbance Rejection
      2. 5.3.2 Reference Tracking
      3. 5.3.3 Step Response
      4. 5.3.4 Inertia Estimation Repeatability
  7. 6Microcontroller Resources
    1. 6.1 CPU Utilization
    2. 6.2 Memory Utilization
    3. 6.3 Security Zones
    4. 6.4 Linker Command File Settings
    5. 6.5 Interfacing FAST ROM Libraries
    6. 6.6 Pin Utilization
    7. 6.7 Consideration of Analog Front-End (AFE) Module
      1. 6.7.1 Routing Current Signals
      2. 6.7.2 Voltage Reference Connection
      3. 6.7.3 Routing Voltage Signals
        1.       A Resources
          1.        B Definition of Terms and Acronyms
            1.         C Revision History

Memory Utilization

Table 7-2 lists the memory usage for each SpinTAC component. In SpinTAC Plan, there are a large number of configuration functions.

Table 6-2 Code Size and RAM Usage for SpinTAC Components
ComponentCode (.text) (16-bit Words)RAM (.ebss) (16-bit Words)
Velocity Control0x2E60x4C
Velocity Move0x4880x5C
Velocity Plan (Minimum)0x6660x4E
Velocity Plan (Maximum)0x14BA0x4E
Velocity Identify0x3920x3C
Position Converter0x21C0x4C
Position Control0x4160x62
Position Move0x13A40xCC
Position Plan (Minimum)0x7AE0x60
Position Plan (Maximum)0x16F40x60

 

Table 7-3 breaks down the maximum stack utilization of SpinTAC components when run individually. The stack consumption of InstaSPIN-FOC is included. To calculate the stack usage, the entire memory section where the stack is placed is filled with known values. The corresponding code was then run for a few minutes. The memory area where the stack was allocated was analyzed and the amount of used memory was calculated.

Table 6-3 Stack Utilization of SpinTAC Components + InstaSPIN-FOC
Configuration Maximum Stack Used
(16-bit Words)
Velocity Control 0x0120
Velocity Move 0x0120
Velocity Plan + Move + Control 0x0120
Velocity Identify 0x0120
Position Converter 0x0120
Position Control 0x0120
Position Move 0x0120
Position Plan + Move + Control 0x0120

Table 7-4 shows the allocated memory for the InstaSPIN-FOC and SpinTAC library.

Table 6-4 2805xF and 2805xM Allocated Memory for InstaSPIN-FOC and SpinTAC Library
Features 2806xF 2806xM 2805xF 2805xM 2802xF
FAST Yes Yes Yes Yes Yes
SpinTAC No Yes No Yes No
Maximum Number of Motors that can be controlled 2 2 2 2 1
Relocalable Controller Structure No No Yes Yes Yes
FAST Version 1.6 1.6 1.7 1.7 1.7
Public Library needs to be added to project No No No No Yes
ROM Library [size, hex, words] 4000 4000 3D27 3D27 2000
ROM Library Start [address, hex] 3F 8000 3F 8000 3F 8808 3F 8808 3F C000
Library Required RAM [size, hex, words] 800 800 800 800 200
Library Start RAM [address, hex] 01 3800 01 3800 00 8000 00 8000 00 0600

 

For the F2805xM device, FAST v1.7 and SpinTAC v2.2.7 are stored in execute-only memory. Figure 7-2 shows the memory map for these devices, highlighting locations that have been assigned for FAST and SpinTAC.

GUID-9EA43833-DF77-4EB1-8096-E96C3424D699-low.gifFigure 6-2 F2805xF and F2805xM Allocated Memory for InstaSPIN-FOC and SpinTAC Library

 

This variant of the library requires the addition of a control structure to the project, which will be loaded to user's RAM space. The control structure is public and contains no specific information about the estimator, but it is needed to allow the library interface to work. The control structure can be declared as a single item, or can be declared as an array of two for user's controlling two motors independently.

// control structure declaration in main.c to control one motor
CTRL_Obj ctrl;
// control structure declaration in main.c to control two motors
CTRL_Obj ctrl[2];

Each ctrl member consumes 0x100 x 16-bit words, or 512 Bytes of memory. The specific location of ctrl or ctrl[2] structures is not important, so users can store these structures anywhere in volatile memory.