Quality RTOS & Embedded Software

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




Loading

LPC2378 HELP! __disable_interrupt()

Posted by Nobody/Anonymous on March 21, 2007
Hi, Im trying to make FreeRTOS run on a LPC2378 (KEIL MCB2300 board).

I have used the ARM7_LPC2129_IAR examlpe to get started.

Now I am having some trouble with the __disable_interrupt() from IAR.
When I debug troug the code I always end up in an infinite loop in __disable_interrupt().

Does anyone know what can be wrong?

Best regards,
Peter Vesterby

RE: LPC2378 HELP! __disable_interrupt()

Posted by Nobody/Anonymous on March 21, 2007
Which compiler are you using? If you are using the Keil tools, then are you using the original Keil compiler or the Realview compiler?

If Keil, then look at the existing Keil port for hints.

If Realview then you can use:

#define portDISABLE_INTERRUPTS()__disable_irq()
#define portENABLE_INTERRUPTS()__enable_irq()

RE: LPC2378 HELP! __disable_interrupt()

Posted by Nobody/Anonymous on March 21, 2007
Sorry, I use the IAR Embedded Workbench, so the names should be right!

The __disable_interrupt() is only to be called from supervisor mode.
Can you tell me how FreeRTOS changes between user an supervisor mode??


/Peter

RE: LPC2378 HELP! __disable_interrupt()

Posted by Nobody/Anonymous on March 21, 2007
The kernel runs in Supervisor mode. Tasks run in System mode. Therefore you can call the enable/disable functions ok.

RE: LPC2378 HELP! __disable_interrupt()

Posted by Nobody/Anonymous on March 21, 2007
Yes but where/how does FreeRTOS changes between modes?

/Peter

RE: LPC2378 HELP! __disable_interrupt()

Posted by Richard on March 22, 2007
SWI is used within API calls when a context switch is required. Also a mode switch occurs within the tick interrupt.

Regards.

RE: LPC2378 HELP! __disable_interrupt()

Posted by Nobody/Anonymous on March 22, 2007
Ok, thanks.

My problem is when debugging with J-Link, I can see the mode is '10000' (usermode) after running the cstartup.s79 !

It sholud be in supervisor mode according to this line from the startupfile:

; Must start in supervisor mode.
MSR CPSR_c, #SVC_MODE|I_Bit|F_Bit

/Peter


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




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

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

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