SWRU439M October   2015  – April 2022

 

  1.   Trademarks
  2. 1Introduction
  3. 2Overview
    1. 2.1 Sensor Controller and AUX Domain Hardware Overview
      1. 2.1.1 Hardware Functionality
      2. 2.1.2 Power and Clock Management
        1. 2.1.2.1 CC13x0 and CC26x0 Operation Modes
        2. 2.1.2.2 CC13x2 and CC26x2 Operation Modes
        3. 2.1.2.3 Communication With the System CPU Application
    2. 2.2 Sensor Controller Interface Driver
      1. 2.2.1 Tailored How-To-Use Guide
      2. 2.2.2 Doxygen Documentation
    3. 2.3 Sensor Controller Programming Model
    4. 2.4 Sensor Controller Tasks
      1. 2.4.1 Data Structures
      2. 2.4.2 Task Code Blocks
      3. 2.4.3 High-Level Program Flow
    5. 2.5 Task Testing and Debugging
    6. 2.6 Run-Time Logging
  4. 3Prerequisites
    1. 3.1 Driver
    2. 3.2 Examples
  5. 4Installation
    1. 4.1 Sensor Controller Studio for Windows
      1. 4.1.1 Update Service
    2. 4.2 Sensor Controller Studio CLI for Linux (64-Bit)
  6. 5Sensor Controller Studio Tutorials
  7. 6Sensor Controller Studio Walkthrough
    1. 6.1  Start Page and Navigation
    2. 6.2  Documentation
    3. 6.3  Open the Example
    4. 6.4  Project Panel
    5. 6.5  Task Panel Settings
    6. 6.6  Constants and Data Structures Panel
    7. 6.7  Task Code Editor Panels
    8. 6.8  I/O Mapping Panel
    9. 6.9  Code Generator Panel
    10. 6.10 Compiling Example Applications in IAR or CCS
    11. 6.11 Task Testing Panel
      1. 6.11.1 Task Testing Setup
      2. 6.11.2 Task Testing Session
      3. 6.11.3 Data Handling
      4. 6.11.4 Task Debugging Panel
    12. 6.12 Run-Time Logging Panel
      1. 6.12.1 Run-Time Logging Setup
      2. 6.12.2 Run-Time Logging Session
  8. 7References
  9. 8Revision History

Task Code Blocks

The task algorithm is divided into four types of code blocks:

  • Initialization Code: Runs one time when the task is started through the task control interface
    • Performs one-time hardware initialization to reduce execution time
    • Sets up task data and hardware for special behavior during the first execution
    • Schedules the next iteration of the Execution Code and (or) sets up an Event Handler Code trigger
  • To run iterations of the Sensor Controller task, one or both of the following code blocks can be implemented:
    • Execution Code: Runs each time the task is scheduled for execution (based on periodic ticks from the real-time counter (RTC))
      • Executes the task algorithm, for example sampling capacitive touch buttons, simple data filtering, processing and buffering
      • Alerts the System CPU application to perform data exchange or signalize events when needed (for example when an array of ADC samples is full)
      • Schedules the next iteration of the Execution Code and (or) sets up an Event Handler Code trigger
    • Event Handler Code: Runs one time when the trigger that was set up occurs, (for example, an edge or level on an AUX I/O pin, or after a variable delay):
      • The timer trigger is typically used to run Sensor Controller tasks at irregular intervals or to follow up on actions performed by the Execution Code
      • The GPIO trigger is typically used to respond to external interrupts
      • Other event triggers are available, depending on the device family
      • Alerts the System CPU application to perform data exchange or signalize events when needed (for example, when accelerometer data indicates movement)
      • Sets up another Event Handler Code trigger, if needed
  • Termination Code: Runs one time when the task is stopped through the task control interface
    • Shuts down hardware left active between task iterations
    • Performs final (partial) data exchange, if needed

The CC13x0 and CC26x0 device family supports one event trigger and one Event Handler Code block per project.

The CC13x2 and CC26x2 device family supports three independent event triggers and up to three Event Handler Code blocks per project.