Perhaps it is because these are 16-bit registers?
Try
#define SSPCR0 (*((volatile unsigned short *) 0xE0068000))
--- In lpc2000@yahoogroups.com, "dsidlauskas1" <dsidlauskas@w...>
wrote:
>
> This one instruction program creates a Data Abort when setting an
SSP
> Register. Anyone know what's going on?
>
>
> int main (void)
> {
>
> #define SSPCR0 (*((volatile unsigned char *) 0xE0068000))
>
> SSPCR0 = 0x3f;
> }
>
> The assembly code looks OK and the register address matches the
> documentation.
>
> 26: SSPCR0 = 0x3f; // SPI Mode, 16 bit frame
> 0x000006B2 213F MOV R1,#0x3F
> 0x000006B4 4803 LDR R0,[PC,#0x000C]
> 0x000006B6 7001 STRB R1,[R0,#0x00]
>
> Thanks for your help.
>
> Dave S.Message
Re: 2138 Data Abort Loading SSP Reg
2005-01-24 by embeddedjanitor
Attachments
- No local attachments were found for this message.