Quality RTOS & Embedded Software

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


Loading

Interrupts driven UART in LPC2368

Posted by eduardo on August 14, 2009
I don't know what is really happening, but I'm just trying to insert serial.c (from LPC2000_GCC) in LPC2368_ECLIPSE example.

It seems to be working fine, except that after a defined number of interrupts (of PutChar in flash.c task) , the ARM freezes. It's the same number, always! In average, 596 putchars and the program stops. If I change optmization level from 0 to 1, this number changes to 1800 putchars. Anyway, I don't know where is the problem. Could somebody help me?

I'm using yagarto and FreeRTOS 5.4.2, last yagarto version (Binutils-2.19., Newlib-1.17.0, GCC-4.3.3, GDB-6.8.50-20080308, Insight-6.8.50-20080308) and Windows XP.

The code is in http://www.4shared.com/file/125067940/aaa9af1b/LPC2368_question.html .

Thanks in advance,
Eduardo Garcia

RE: Interrupts driven UART in LPC2368

Posted by eduardo on August 15, 2009
Now, I tried change the IRQ size to 0x400 (just like boot.s in LPC2106 example) but it is not the problem.

:-(

Any ideas?

RE: Interrupts driven UART in LPC2368

Posted by eduardo on August 17, 2009
Unfortunatelly, not yet.... I have tried the interrupts without queue functions and the result is the same. After exacts 2021 SendPutChars, or after receive 2021 characters, the firmware stop working.

I have tried with vApplicationStackOverflowHook but this function haven't been called.

This number changes regard to optimization level. By the way, I'm using -O1 now.

IMHO, it really seems to be a stack problem because the well defined number of interrupts that causes the error. But, increasing IRQ stack in boot.s there is no changes. And if a send chars over UART0 with no interrupts, this problem doesn't happen.

The source code now is a bit changed from the posted... but the error is the same. :-(

RE: Interrupts driven UART in LPC2368

Posted by eduardo on August 18, 2009
I've just discovered and fixed the problem.

There as a mistake in uart wrapper function prototype, so that, the real function was not a naked function. Each time that the uart_wrap function was called, the stack wasn't recovered.

Once I declared uart wrapper function correctly, everything starts working fine.


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


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

Latest News

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

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

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


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

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