SPMA085 June   2022 TM4C1230C3PM , TM4C1230C3PM , TM4C1230D5PM , TM4C1230D5PM , TM4C1230E6PM , TM4C1230E6PM , TM4C1230H6PM , TM4C1230H6PM , TM4C1231C3PM , TM4C1231C3PM , TM4C1231D5PM , TM4C1231D5PM , TM4C1231D5PZ , TM4C1231D5PZ , TM4C1231E6PM , TM4C1231E6PM , TM4C1231E6PZ , TM4C1231E6PZ , TM4C1231H6PGE , TM4C1231H6PGE , TM4C1231H6PM , TM4C1231H6PM , TM4C1231H6PZ , TM4C1231H6PZ , TM4C1232C3PM , TM4C1232C3PM , TM4C1232D5PM , TM4C1232D5PM , TM4C1232E6PM , TM4C1232E6PM , TM4C1232H6PM , TM4C1232H6PM , TM4C1233C3PM , TM4C1233C3PM , TM4C1233D5PM , TM4C1233D5PM , TM4C1233D5PZ , TM4C1233D5PZ , TM4C1233E6PM , TM4C1233E6PM , TM4C1233E6PZ , TM4C1233E6PZ , TM4C1233H6PGE , TM4C1233H6PGE , TM4C1233H6PM , TM4C1233H6PM , TM4C1233H6PZ , TM4C1233H6PZ , TM4C1236D5PM , TM4C1236D5PM , TM4C1236E6PM , TM4C1236E6PM , TM4C1236H6PM , TM4C1236H6PM , TM4C1237D5PM , TM4C1237D5PM , TM4C1237D5PZ , TM4C1237D5PZ , TM4C1237E6PM , TM4C1237E6PM , TM4C1237E6PZ , TM4C1237E6PZ , TM4C1237H6PGE , TM4C1237H6PGE , TM4C1237H6PM , TM4C1237H6PM , TM4C1237H6PZ , TM4C1237H6PZ , TM4C123AE6PM , TM4C123AE6PM , TM4C123AH6PM , TM4C123AH6PM , TM4C123BE6PM , TM4C123BE6PM , TM4C123BE6PZ , TM4C123BE6PZ , TM4C123BH6PGE , TM4C123BH6PGE , TM4C123BH6PM , TM4C123BH6PM , TM4C123BH6PZ , TM4C123BH6PZ , TM4C123FE6PM , TM4C123FE6PM , TM4C123FH6PM , TM4C123FH6PM , TM4C123GE6PM , TM4C123GE6PM , TM4C123GE6PZ , TM4C123GE6PZ , TM4C123GH6PGE , TM4C123GH6PGE , TM4C123GH6PM , TM4C123GH6PM , TM4C123GH6PZ , TM4C123GH6PZ , TM4C123GH6ZXR , TM4C123GH6ZXR , TM4C1290NCPDT , TM4C1290NCPDT , TM4C1290NCZAD , TM4C1290NCZAD , TM4C1292NCPDT , TM4C1292NCPDT , TM4C1292NCZAD , TM4C1292NCZAD , TM4C1294KCPDT , TM4C1294KCPDT , TM4C1294NCPDT , TM4C1294NCPDT , TM4C1294NCZAD , TM4C1294NCZAD , TM4C1297NCZAD , TM4C1297NCZAD , TM4C1299KCZAD , TM4C1299KCZAD , TM4C1299NCZAD , TM4C1299NCZAD , TM4C129CNCPDT , TM4C129CNCPDT , TM4C129CNCZAD , TM4C129CNCZAD , TM4C129DNCPDT , TM4C129DNCPDT , TM4C129DNCZAD , TM4C129DNCZAD , TM4C129EKCPDT , TM4C129EKCPDT , TM4C129ENCPDT , TM4C129ENCPDT , TM4C129ENCZAD , TM4C129ENCZAD , TM4C129LNCZAD , TM4C129LNCZAD , TM4C129XKCZAD , TM4C129XKCZAD , TM4C129XNCZAD , TM4C129XNCZAD

 

  1.   Abstract
  2.   Trademarks
  3. 1Introduction
  4. 2How to Install
    1. 2.1 Update the FreeRTOS Version in the TivaWare Directory
    2. 2.2 Adding FreeRTOS Hardware Driver Files for TM4C LaunchPads
  5. 3Architecture for TM4C FreeRTOS Examples
    1. 3.1 Proper Clock Configuration
    2. 3.2 How to use Hardware Interrupts Alongside the FreeRTOS Kernel
  6. 4Example Project Walkthroughs
    1. 4.1 Download and Import the Examples
    2. 4.2 Kernel Examples
      1. 4.2.1 Example: hello
      2. 4.2.2 Example: notify_example
      3. 4.2.3 Example: queue_example
      4. 4.2.4 Example: semaphore_example
      5. 4.2.5 Example: blinky_queue
      6. 4.2.6 Software Timer Examples
        1. 4.2.6.1 Example: timer_sw_oneshot
        2. 4.2.6.2 Example: timer_sw_periodic
        3. 4.2.6.3 Example: timer_sw_led_counter/timer_sw_rgb
    3. 4.3 ADC Examples
      1. 4.3.1 Example: adc_multi_channel
      2. 4.3.2 Example: adc_timer_trigger
    4. 4.4 Hardware Timer Examples
      1. 4.4.1 Example: timer_hw_oneshot
      2. 4.4.2 Example: timer_hw_periodic
      3. 4.4.3 Example: timer_hw_pwm
    5. 4.5 UART Example
      1. 4.5.1 Example: uart_thread_safe
    6. 4.6 Watchdog Example
      1. 4.6.1 Example: watchdog

Kernel Examples

The kernel examples are used to demonstrate many of the fundamental components of a multitasking system. The FreeRTOS APIs covered in these examples are summarized in Table 4-2. For more details on each API and additional capabilities offered by the kernel that are not covered in the provided examples, see the FreeRTOS reference manual.

Table 4-2 FreeRTOS APIs
xTaskCreate Creates a task.
vTaskDelete Deletes a task.
vTaskStartScheduler Starts the FreeRTOS scheduler.
xSemaphoreCreateBinary Creates a binary semaphore.
xSemaphoreCreateMutex Creates a mutex type semaphore. A mutex is a special type of binary semaphore that is used to control access to a resource that is shared between tasks.
xSemaphoreTake Obtains a semaphore that has previously been created. If a semaphore is not obtained then the task remains in BLOCKed state.
xSemaphoreGiveFromISR Releases a semaphore that has been previously created. Calling xSemaphoreGiveFromISR makes the semaphore available to cause a task to leave the BLOCKed state.
xQueueCreate Creates a new queue that allows items to be passed between tasks.
xQueueSend Sends an item to a queue.
xQueueReceive Receives an item from a queue.
ulTaskNotifyTake A faster and lighter weight alternative to a binary semaphore, but comes with more limitations.
vTaskNotifyGiveFromISR A faster and light weight version of xSemaphoreGiveFromISR for task synchronization.
XTimerCreate Creates a software timer.
XTimerStart Starts a software timer running.
xTaskGetTickCount Returns the current tick count value which is the total number of tick interrupts that have occurred since the scheduler started.
vTaskDelay Places the task that into the BLOCKed state for a fixed number of ticks.