FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [August 2009 Threads] Interrupts driven UART in LPC2368Posted 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 LPC2368Posted 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 LPC2368Posted 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 LPC2368Posted 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.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|