Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




Loading

Stack-Problem on LPC2290

Posted by Joe on March 14, 2007
Hi @all,

i have the FreeRTOS running on a LPC2290-Board and up to now it works fine. Additionally i have added the newlib-lpc-port from Aeolus and it also runs fine. For developing I'm using the WinARM-distribution.

Now i have tried to extend the system with an proprietary CAN-driver and the i get abort-errors and some strange behaviour. I'm still debugging with a GBD-Insight with segger-JLink and my gdg told me, the may be stack is corrupted or I got the message "cannot access the memory address 0x11111111" which is the regvalue of r11.

I think, that stacksizes are big enough, 0x2000 for IRQ and SVC !

At the moment I don't have any idea how to catch this problem, does anyone have an idea how to find this error ?

regards

Joe

RE: Stack-Problem on LPC2290

Posted by Joe on March 14, 2007
additional information:

the error occurrs only after a CAN-Interrupt and only when I call function ins the CAN-isr.

RE: Stack-Problem on LPC2290

Posted by Nobody/Anonymous on March 14, 2007
Does the CAN ISR use a lot of stack?
Has the CAN ISR been written using the required syntax (naked attributes, portENTER_SWITCHING_ISR(), only declaring variables ater the call to portENTER_SWITCHING_ISR(), etc)?

In the Data Abort handler, inspect the value of pxCurrentTCB to find out the location of the stack being used. If there are no 0xA5's left in the stack then it has overflowed.

RE: Stack-Problem on LPC2290

Posted by Joe on March 14, 2007
I don't want to switch in the CAN-Isr only proceed my CAN-driver

the ISR ist attributed with the follwoing statement:

void __attribute__((interrupt("IRQ"))) v_lpc22xx_CanIsrRxBus1 (void)

I think it seems to be OK !

I also tried to use the Macros : portSAVE_CONTEXT & portRESTORE_CONTEXT but that crashed immediately :-(

Joe

RE: Stack-Problem on LPC2290

Posted by Nobody/Anonymous on March 14, 2007
> I don't want to switch in the CAN-Isr only proceed my CAN-driver

Not sure what this is meaning.


portSAVE_CONTEXT & portRESTORE_CONTEXT should not be used in an IRQ.

portENTER_SWITCHING_ISR() portEXIT_SWITCHING_ISR() can only be used in naked functions.

Does not help with your problem. Just clarification.

RE: Stack-Problem on LPC2290

Posted by Joe on March 14, 2007
the problem is solved :-) after adding the macros to the isr the system is running and I also understand why
the macros are so neccessary


thank you for helping

regards
Joe


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




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists