Lab 3: Move Application into an RTOS

Step 4: With MHC, Configure Harmony Core

1

Add a third application.

  • Select Harmony Core Service.
  • Set Number of Applications to 3.
  • Enter "app_usb" for the new Application Name.
lab3_step4_01.png
Figure 1: Add app_usb Application

2

Verify RTOS configuration of app_sensor task.

  • Expand and observe the RTOS Configuration in Application 0 Configuration.
  • The app_sensor task reads the temperature value and fills the queue of the app_sdcard task.
lab3_step4_02.png
Figure 2: Verify app_sensor RTOS Settings

3

Modify RTOS configuration of app_sdcard task.

  • Expand RTOS Configuration in Application 1 Configuration.
  • Tick the box Use Task Delay and set 50 ms of delay (default value).
  • The app_sdcard thread is blocked until the queue is filled by the app_sensor task.
  • Once unblocked, the app_sdcard will log the temperature value with a timestamp into the SD card memory.
  • Then, the task will wait for the queue to be filled with the next data.
lab3_step4_03.png
Figure 3: Configure Task Delay to app_sdcard RTOS Settings

4

Verify RTOS configuration of app_usb task.

  • Expand RTOS Configuration in Application 2 Configuration.
  • The app_usb thread is blocked until the queue is filled by the other task's thread (when another task requests to print some data over USB CDC Console).
  • Once unblocked, it will print the content of the queue on the serial port.
  • Then, the task will wait for the queue to be filled with the next data to print.
lab3_step4_04.png
Figure 4: Verify app_usb RTOS Settings



Next Step >

© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.