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

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) 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