Keil™, An ARM® Company

Discussion Forum

Disabling Interrupts in the ARM core

Next Thread | Thread List | Previous Thread Start a Thread | Settings

DetailsMessage
Read-Only
Author
Soennichsen Richard
Posted
20-Dec-2004 15:16
Toolset
ARM
New! Disabling Interrupts in the ARM core
I have tried to globally disable interrupts using the assembly defines mentioned in the Keil note about nested interrupts.
http://www.keil.com/support/docs/2910.htm

When I try to call IENABLE or IDISABLE I get assembler errors associated with the MRS LR op-code.

Has anyone gotten this to work? Is there an alternative method to globally diasabling interrupts in the Keil environment?

Rich
Read-Only
Author
Soennichsen Richard
Posted
20-Dec-2004 16:19
Toolset
ARM
New! RE: Disabling Interrupts in the ARM core
I found the problem. There is an SPI register defined as SPSR (LPC210x.h) which is the same as the Saved Program Staus Register in the ARM core. This creates a conflict when embedding assembly code in C code.

Keil, are you listening? ;-)

Rich
Read-Only
Author
Jon Ward
Posted
20-Dec-2004 17:48
Toolset
ARM
New! RE: Disabling Interrupts in the ARM core
In the LPX210x.H file that I have the SPI SPSR register is defined as follows:

/* SPI (Serial Peripheral Interface) */
#define SPI_SPCR       (*((volatile unsigned char *) 0xE0020000))
#define SPI_SPSR       (*((volatile unsigned char *) 0xE0020004))
#define SPI_SPDR       (*((volatile unsigned char *) 0xE0020008))
#define SPI_SPCCR      (*((volatile unsigned char *) 0xE002000C))
#define SPI_SPTCR      (*((volatile unsigned char *) 0xE0020010))
#define SPI_SPTSR      (*((volatile unsigned char *) 0xE0020014))
#define SPI_SPTOR      (*((volatile unsigned char *) 0xE0020018))
#define SPI_SPINT      (*((volatile unsigned char *) 0xE002001C))

Is yours defined differently than that?

You can download this file from http://www.keil.com/dd/chip/3483.htm.

Jon
Read-Only
Author
Richard Soennichsen
Posted
21-Dec-2004 00:47
Toolset
ARM
New! RE: Disabling Interrupts in the ARM core
Hi Jon,
Yes, in mine (I have downloaded the latest update and our package is only a week old) the SPI_ is missing for all SPI SFRs.

Richard
Read-Only
Author
Keil Reinhard
Posted
21-Dec-2004 01:11
Toolset
ARM
New! RE: Disabling Interrupts in the ARM core
The SPI_ prefix has been taken out by Philips. Now we have got this conflict. I am in contact with Philips to sort it out and make it consistent with the datasheets.

Reinhard

Next Thread | Thread List | Previous Thread Start a Thread | Settings