SLAAEK8A August   2024  – August 2025 MSPM0C1105 , MSPM0C1106 , MSPM0G3507 , MSPM0H3216 , MSPM0L1306

 

  1.   1
  2. Description
  3. Required Peripherals
  4. Design Steps
  5. Design Considerations
  6. Software Flow Chart
  7. Application Code
    1. 6.1 Scheduler Code
    2. 6.2 Main Application Code
  8. Additional Resources
  9. E2E
  10. Revision History
  11. 10Trademarks

Design Steps

Complete the following to implement the simple scheduler application:

  1. Either start with the example subsystem project, or add the scheduler source and header files to the existing project.
  2. The scheduler function is constructed to act as the main software loop for the application. After initialization, add a call to the scheduler function as shown in Section 6.
  3. For each task to be performed in the system, create a function to get, set, and reset the pending flag for the appropriate task. Also create the actual function to be run when the scheduler attempts execution. The DAC8Driver and SwitchDriver source and header files provide simple examples of how this can be done.
  4. Add the appropriate Interrupt Request (IRQ) handlers to enable the pending tasks based on the required hardware events. The IRQ handlers set the pending task flags, and increment the pending task counter. These values are checked by the scheduler when the device is woken from sleep by a system interrupt.