Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


FreeRTOS and USART with ATmega32

Posted by Mike M on November 28, 2011
I am using an ATmega32. I have a serial lcd that works great outside of freeRTOS, but when I re-configure the code and place it into freeRTOS, it does not work. After some research online I think I discovered that I needed to add freeRTOS_serial.c and freeRTOS_serial.h in order to use the USART capabilities of my atmega32. My problem is that after adding these files, it still will not work. I cant find any info online about using USART with freeRTOS. I just dont understand if I have to change anything in the freeRTOS_serial.c file or not? Can anyone de-mystify using USART within freeRTOS for me?

I know that adding the files is needed because after running the program with the added files, lots of ascii gibberish was seen rushing across the screen, where before there was nothing. Could it be a baud rate issue?

RE: FreeRTOS and USART with ATmega32

Posted by Richard on November 29, 2011
I don't know what FreeRTOS_serial.c and FreeRTOS_serial.h came from. There are no files in the FreeRTOS demo called that. There are demo serial port files in FreeRTOS, but they are not designed to be efficient, just test the port by using queues in an interrupt and generating as high an interrupt load as possible.

As long as you write your interrupt service routines in compliance with the instructions given on the documentation page for the port you are using, there is very little mutual reliance on FreeRTOS and how you write you UART drivers. FreeRTOS provides a means for the ISR to communicate and synchronize with tasks, and a means for context switches to happen in ISRs (if an ISR causes a task to unblock, and the task has a priority higher than the currently running task) - and (currently) not much else.


[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]

Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS v10.2.0 is available for immediate download. MIT licensed, and including RISC-V and ARMv8-M (Cortex-M33) demos.

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


FreeRTOS and other embedded software careers at AWS.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Cadence Tensilica Cortes

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers





STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner