Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Thread

2138 Data Abort Loading SSP Reg

2138 Data Abort Loading SSP Reg

2005-01-23 by dsidlauskas1

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.

Re: 2138 Data Abort Loading SSP Reg

2005-01-24 by embeddedjanitor

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
Show quoted textHide quoted text
> 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.

Re: 2138 Data Abort Loading SSP Reg

2005-01-24 by dsidlauskas1

Woops! The problem is with the Keil Simulator, not the part or code.
It runs fine on the hardware.

Dave S.


--- In lpc2000@yahoogroups.com, "dsidlauskas1" <dsidlauskas@w...> wrote:
Show quoted textHide quoted text
> 
> 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.

Re: 2138 Data Abort Loading SSP Reg

2005-01-24 by tkreyche

Dave,

I've just spent a lot of time over the past two weeks working with 
SSP on the Keil kit, interfacing it to a TI ADS1256 ADC. I've run 
into a variety of weird problems and have plowed through some of 
them, and have wasted a lot of time with issues just like this ;-) I 
guess that's the learning curve. I am currently stuck on a problem 
that's too complicated to describe quickly. Anyway, I'm interested in 
corresponding with people doing similar SSP work.

What are you interfacing with?

Tom


--- In lpc2000@yahoogroups.com, "dsidlauskas1" <dsidlauskas@w...> 
wrote:
> 
> Woops! The problem is with the Keil Simulator, not the part or code.
> It runs fine on the hardware.
> 
> Dave S.
> 
> 
> --- 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?
> >

Re: 2138 Data Abort Loading SSP Reg

2005-01-25 by dsidlauskas1

Hi Tom,

The problem with the Keil development system and the LPC213x is that
the Keil system doesn't know the LPC213x SFR's. That's why it's
simulator threw a Data Abort, the SSP registers were outside its valid
data area. I'm not sure where the Keil system gets the SFR def's from.
The device database setup implies that it comes from the LPC213x.h
header file. I've specified that as the register definition file for
the 2138 in the device database, but that doesn't fix the problem. The
workaround for now has been to forget the simulator. I've emailed
their tech support but haven't had an answer yet.

I'm interfaceing to an OmniVision 7146 CMOS Image Array. I think I
have the SSP working now, but it needs a little more testing. My
requirements are very simple. I poll the SSP for data until I receive
a complete frame. There's no ISR.

Regards,

Dave

--- In lpc2000@yahoogroups.com, "tkreyche" <tkreyche@w...> wrote:
Show quoted textHide quoted text
> 
> Dave,
> 
> I've just spent a lot of time over the past two weeks working with 
> SSP on the Keil kit, interfacing it to a TI ADS1256 ADC. I've run 
> into a variety of weird problems and have plowed through some of 
> them, and have wasted a lot of time with issues just like this ;-) I 
> guess that's the learning curve. I am currently stuck on a problem 
> that's too complicated to describe quickly. Anyway, I'm interested in 
> corresponding with people doing similar SSP work.
> 
> What are you interfacing with?
> 
> Tom
> 
> 
> --- In lpc2000@yahoogroups.com, "dsidlauskas1" <dsidlauskas@w...> 
> wrote:
> > 
> > Woops! The problem is with the Keil Simulator, not the part or code.
> > It runs fine on the hardware.
> > 
> > Dave S.
> > 
> > 
> > --- 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?
> > >

Re: 2138 Data Abort Loading SSP Reg

2005-01-25 by tkreyche

Dave,

I gave up on the simulator almost immediately for the reasons you 
state below. Also when hooking up to external hardware a simulator is 
only marginally useful...it's just not the real world.

My current problem is they type I hate, weird and not perfectly 
repeatable:

I send two separate command bytes to the ADC, short delay, then send 
a dummy byte to trigger clock for the ADC to send back a status 
register byte.

The problem is that when I repeat this in an endless loop, when I 
read the status byte it changes for about the first 10 samples and 
then stabilizes and send the correct response. Scope results seem to 
show the correct data is being returned.

Formely I had this working perfectly with an 8-bit micro. Something's 
glitchy and I just don't know what.

So far I like the Keil 2138 kit, however I am able to get their IDE 
to crash occasionally.

Tom



--- In lpc2000@yahoogroups.com, "dsidlauskas1" <dsidlauskas@w...> 
wrote:
> 
> Hi Tom,
> 
> The problem with the Keil development system and the LPC213x is that
> the Keil system doesn't know the LPC213x SFR's. That's why it's
> simulator threw a Data Abort, the SSP registers were outside its 
valid
> data area. I'm not sure where the Keil system gets the SFR def's 
from.
> The device database setup implies that it comes from the LPC213x.h
> header file. I've specified that as the register definition file for
> the 2138 in the device database, but that doesn't fix the problem. 
The
> workaround for now has been to forget the simulator. I've emailed
> their tech support but haven't had an answer yet.
> 
> I'm interfaceing to an OmniVision 7146 CMOS Image Array. I think I
> have the SSP working now, but it needs a little more testing. My
> requirements are very simple. I poll the SSP for data until I 
receive
Show quoted textHide quoted text
> a complete frame. There's no ISR.
> 
> Regards,
> 
> Dave
>

Re: 2138 Data Abort Loading SSP Reg

2005-01-25 by dsidlauskas1

Tom,

Does your SSP clock phasing match the ADC?

Keil says the LPC213x problem will be fixed by the end of February.
Also be aware that SSPCR0 and SSPDR should be defined in LPC213x as
short * rather than char *.

Dave

--- In lpc2000@yahoogroups.com, "tkreyche" <tkreyche@w...> wrote:
Show quoted textHide quoted text
> 
> Dave,
> 
> I gave up on the simulator almost immediately for the reasons you 
> state below. Also when hooking up to external hardware a simulator is 
> only marginally useful...it's just not the real world.
> 
> My current problem is they type I hate, weird and not perfectly 
> repeatable:
> 
> I send two separate command bytes to the ADC, short delay, then send 
> a dummy byte to trigger clock for the ADC to send back a status 
> register byte.
> 
> The problem is that when I repeat this in an endless loop, when I 
> read the status byte it changes for about the first 10 samples and 
> then stabilizes and send the correct response. Scope results seem to 
> show the correct data is being returned.
> 
> Formely I had this working perfectly with an 8-bit micro. Something's 
> glitchy and I just don't know what.
> 
> So far I like the Keil 2138 kit, however I am able to get their IDE 
> to crash occasionally.
> 
> Tom
> 
> 
> 
> --- In lpc2000@yahoogroups.com, "dsidlauskas1" <dsidlauskas@w...> 
> wrote:
> > 
> > Hi Tom,
> > 
> > The problem with the Keil development system and the LPC213x is that
> > the Keil system doesn't know the LPC213x SFR's. That's why it's
> > simulator threw a Data Abort, the SSP registers were outside its 
> valid
> > data area. I'm not sure where the Keil system gets the SFR def's 
> from.
> > The device database setup implies that it comes from the LPC213x.h
> > header file. I've specified that as the register definition file for
> > the 2138 in the device database, but that doesn't fix the problem. 
> The
> > workaround for now has been to forget the simulator. I've emailed
> > their tech support but haven't had an answer yet.
> > 
> > I'm interfaceing to an OmniVision 7146 CMOS Image Array. I think I
> > have the SSP working now, but it needs a little more testing. My
> > requirements are very simple. I poll the SSP for data until I 
> receive
> > a complete frame. There's no ISR.
> > 
> > Regards,
> > 
> > Dave
> >

Re: 2138 Data Abort Loading SSP Reg

2005-01-25 by dsidlauskas1

Keil says that the problem is only with the SSP registers and will be
fixed by the end of February. Also be aware that SSPCR0 and SSPDR are
defined in LPC213x.h as char * but should be short *.

Dave Sidlauskas


--- In lpc2000@yahoogroups.com, "dsidlauskas1" <dsidlauskas@w...> wrote:
Show quoted textHide quoted text
> 
> Woops! The problem is with the Keil Simulator, not the part or code.
> It runs fine on the hardware.
> 
> Dave S.
> 
> 
> --- 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.

Re: 2138 Data Abort Loading SSP Reg

2005-01-26 by tkreyche

Dave,

I'm starting to think that there is an incompatibility between the TI 
spec and the 2138 on the receive timing. I tried both phases and they 
both sortof work but not quite perfectly. The ADC responds correctly 
to the transmit but the receive isn't read properly. The SPI specs 
from the two companies are written very differently...I need to go 
back and re-read.

Next I think I'll try the SPI port and see what happens. The specs 
for that seem to be lifted out of an earlier manual and the phase is 
not described the same way as it is for the SSP port. 

I had no such problems when I wired up and tested with the 8-bit 
micro (Rabbit 3000)...it worked perfectly.

Tom


--- In lpc2000@yahoogroups.com, "dsidlauskas1" <dsidlauskas@w...> 
wrote:
Show quoted textHide quoted text
> 
> Tom,
> 
> Does your SSP clock phasing match the ADC?
> 
> Keil says the LPC213x problem will be fixed by the end of February.
> Also be aware that SSPCR0 and SSPDR should be defined in LPC213x as
> short * rather than char *.
> 
> Dave
>

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.