We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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
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
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))
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
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