Quality RTOS & Embedded Software

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


UART gives garbage in FreeRTOS+IO in MPU mode in lpc 1769

Posted by bhaveshshah2310 on February 20, 2015

I am trying to make a code in MPU mode which print some status of tasks on UART terminal using UART3 in MPU mode

I am using FreeRTOS+IO framework for UART communication. I took UART code from FreeRTOS.org site which have many IO parts in it like I2C UART etc. I have tested this code separately where MPU is not present and it is running properly it is giving properly. I can see proper output string on minicom console in linux. now in my project i create an environment for MPU and include necessary files for FreeRTOS+IO framework. which include CMSISv2p00LPC17xx with lpc17xx.cmsis.driver.library and necessary changes FreeRTOSConfig.h and also added FreeRTOSIO_BSP.h and FreeRTOSIOConfig.h

all the necessary thing is been changed but when i try to open UART3 port and try to write something in it then it shows in a garbage form on the minicom terminal. the same bunch of code which is working in freeRTOS+IO framework is not giving garbage over here . . i have checked the baud-rate and the SystemCoreClock is same as it should be in FreeRTOS_IO demos..

i am bit confuse here which other factors can cause the output string in garbage. then those factors . . can anyone suggest me something on this ? how to solve this problem.

UART gives garbage in FreeRTOS+IO in MPU mode in lpc 1769

Posted by rtel on February 20, 2015

So the code is the same, but the FreeRTOS port has been switched to the MPU version...if that is the case I can't think of anything offhand that could cause the baud rate to to change - if that is the genuine cause of the problem.

Presumably other things will have changed too in order to set up the MPU regions? Or are you creating the tasks in privileged mode?

Can you use the debugger to compare the values in the UART's registers to ensure they are all identical between the working and non-working versions? Are you sure the clock feeding the UART is also at the same frequency between the two versions?


UART gives garbage in FreeRTOS+IO in MPU mode in lpc 1769

Posted by bhaveshshah2310 on February 26, 2015

I found the problem that the peripheral clock frequency was not properly set up due to that it was giving me some problems there.. Now as i have done it properly it is working as per the expectation. Thank you for your suggestion it helped me out over here.

[ 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.1 is available for immediate download. MIT licensed, includes 64-bit RISC-V, NXP Cortex-M33 demo, Nuvoton Cortex-M23 demo & STM32H745 dual core (AMP) demo.

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