FreeRTOS-Kernel/FreeRTOS/Demo/AVR_Dx_MPLAB.X
johnrhen 43defa566c
Apply release changes to main branch (#759)
* Update History.txt and README.md for December release (#744)

* Update History.txt and README.md for release

* Bump mbedtls submodule to v2.28.0 (#745)

* Patch project files for mbedtls (#751)

* Apply group 1 patches

* Apply patches for group 2

* Update project files for mbedTLS new version

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>

* Fix warnings in projects

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>

* Fix warnings in HTTP_S3_Download demo

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>

Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>

* Update changelog and history for corePKCS11 update (#752)

* Update submodule pointer and manifest.yml for corePKCS11 (#754)

* Update readme and history.txt to show that Sigv4 is a newly added library (#756)

* Revert update to v143 of VS toolset (#757)

* [AUTO][RELEASE]: Bump file header version to "202112.00"

* Update file headers to satisfy core checks

Co-authored-by: Muneeb Ahmed <54290492+muneebahmed10@users.noreply.github.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: johnrhen <johnrhen@users.noreply.github.com>
2021-12-23 10:16:27 -08:00
..
nbproject update configurations.xml to use the latest Microchip AVR DFP 1.6.88 (#518) 2021-03-16 17:16:21 -07:00
ParTest Apply release changes to main branch (#759) 2021-12-23 10:16:27 -08:00
serial Apply release changes to main branch (#759) 2021-12-23 10:16:27 -08:00
.gitignore Update previous AVR ATmega0 and AVR Dx projecs + addition of equivalent projects in MPLAB.X and IAR (#180) 2020-08-06 12:37:08 -07:00
clk_config.h Update previous AVR ATmega0 and AVR Dx projecs + addition of equivalent projects in MPLAB.X and IAR (#180) 2020-08-06 12:37:08 -07:00
FreeRTOSConfig.h Apply release changes to main branch (#759) 2021-12-23 10:16:27 -08:00
main.c Fix warnings after moving callback prototypes (#208) 2020-08-27 00:40:47 -07:00
main_blinky.c Apply release changes to main branch (#759) 2021-12-23 10:16:27 -08:00
main_full.c Update previous AVR ATmega0 and AVR Dx projecs + addition of equivalent projects in MPLAB.X and IAR (#180) 2020-08-06 12:37:08 -07:00
main_minimal.c Update previous AVR ATmega0 and AVR Dx projecs + addition of equivalent projects in MPLAB.X and IAR (#180) 2020-08-06 12:37:08 -07:00
Makefile Update previous AVR ATmega0 and AVR Dx projecs + addition of equivalent projects in MPLAB.X and IAR (#180) 2020-08-06 12:37:08 -07:00
readme.md Update previous AVR ATmega0 and AVR Dx projecs + addition of equivalent projects in MPLAB.X and IAR (#180) 2020-08-06 12:37:08 -07:00
RegTest.c Apply release changes to main branch (#759) 2021-12-23 10:16:27 -08:00
RegTest.h Apply release changes to main branch (#759) 2021-12-23 10:16:27 -08:00

Overview

This directory contains a MPLAB-X demo project (XC8 compiler) for AVR128DA48 Curiosity Nano board equipped with AVR128DA48 microcontroller (128 KB Flash, 16 KB SRAM, 512 bytes EEPROM).

The project comes as three different demos, selectable by a define in the main.c file. Each demo has its own main-demo_name.c file. Follow the instructions on the RTOS port documentation page for details about how to setup the target hardware, download and execute the demo application.

Blinky Demo

#define mainSELECTED_APPLICATION 0

Blinky demos are intended for beginners. They normally create just two tasks that communicates with each other through a queue. Their functionality is contained in a single C source file called main_blinky.c.

One of the tasks repeatedly sends a predefined value to the queue with 200 ms intervals, while the other task waits for messages to be available in the queue. Once a new message is available, it toggles on board LED if the value matches the expected value.

Minimal Demo

#define mainSELECTED_APPLICATION 1

This demo includes a higher number of tasks than the Blinky demo, but the complexity is still fairly low. Whole functionality is included in the main_minimal.c file by using the following tasks:

  • integer math task (Integer.c)
  • register tasks to verify the context switch (Regtest.c)
  • polled queue tasks (PollQ.c)
  • serial communiation tasks (Serial.c)
  • check task that periodically checks the other tasks are operating without error.

This demo uses the check task to periodically inspect the standard demo tasks in order to ensure all the tasks are functioning as expected. The check task also toggles an LED to give a visual feedback of the system status. If the LED is toggling roughly every second, then the check task has not discovered any problems. If the LED stops toggling, then the check task has discovered a problem in one or more tasks.

To see the console output from serial communication tasks, serial port could be configured as:

  • baud rate 9600
  • data 8-bit
  • parity none
  • stop bits 1-bit
  • flow control none

Full Demo

#define mainSELECTED_APPLICATION 2

This demo is a comprehensive demonstration and test of a lot of FreeRTOS features, including direct task to task notifications, queues, semaphores, recursive semaphores, software timers, and more. The following tasks are created in main_full.c file:

  • register tasks to verify the context switch (Regtest.c)
  • semaphores task (Semtest.c)
  • direct task to task notification task (TaskNotify.c)
  • recursive semaphores task (Regmutex.c)
  • check task that periodically checks the other tasks are operating without error

The demo uses the check task to periodically inspect the standard demo tasks in order to ensure all the tasks are functioning as expected. The check task also toggles an LED to give a visual feedback of the system status. If the LED is toggling roughly every 3 seconds, then the check task has not discovered any problems. If the LED stops toggling, then the check task has discovered a problem in one or more tasks.

Quick start

To run this demo on AVR128DA48 Curiosity Nano platform, the following steps are required:

  • install MPLAB® X IDE
  • install MPLAB® XC8 compiler
  • open AVR_Dx_MPLAB.X project file from current folder
  • select desired demo using #define mainSELECTED_APPLICATION as explained in the previous section
  • build and debug the project

References