Search the web
Sign In
New User? Sign Up
lpc2000 · LPC ARM Group
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Messages 45872 - 45901 of 46755   Newest  |  < Newer  |  Older >  |  Oldest
Messages: Show Message Summaries   (Group by Topic) Sort by Date v  
#45901 From: "Paul Curtis" <plc@...>
Date: Tue Nov 10, 2009 10:12 pm
Subject: Re: Re: fabsf problem
paul_l_curtis
Offline Offline
Send Email Send Email
 
On Tue, 10 Nov 2009 22:09:17 -0000, drproton2003 <drproton2003@...>
wrote:

> D'ohh.  This was the first time I made any math calls from this file, so
> I didn't have math.h in there.  my mistake. Not the first time I've done
> this, but in past cases the functions always failed, not just
> intermittently failed.  Is there another fabsf() that gets used if
> math.h is not included?

No.  It's just if that you have not prototyped f then by the "rules of C",
fabsf get defined as:

int fabsf();

Note that this is *not* the same as

int fabsf(void);

That's another common misconception.  Perhaps you should mull that one
over too.  :-)

You just can't pay for support like this...

-- Paul.

#45900 From: "drproton2003" <drproton2003@...>
Date: Tue Nov 10, 2009 10:09 pm
Subject: Re: fabsf problem
drproton2003
Offline Offline
Send Email Send Email
 
D'ohh.  This was the first time I made any math calls from this file, so I
didn't have math.h in there.  my mistake. Not the first time I've done this, but
in past cases the functions always failed, not just intermittently failed.  Is
there another fabsf() that gets used if math.h is not included?

--- In lpc2000@yahoogroups.com, "Paul Curtis" <plc@...> wrote:
>
> On Tue, 10 Nov 2009 20:22:07 -0000, drproton2003 <drproton2003@...>
> wrote:
>
> > I've come across a problem with fabsf() in crossworks.  Here is a code
> > snippet:
> >
> >   ftemp=fabsf(FloatArray[0]);
> >   ftemp2=fabsf(FloatArray[1]);
> >   if((ftemp<51.0f)&&(ftemp2<51.0f))
> >     {
> >     FloatArray[0]*=10;
> >     FloatArray[1]*=10;
> >     itemp=0;
> >     }
> >     else
> >     {
> >     itemp=1<<30;
> >     }
> >
> > For some reason every once in a while (maybe 5-10% of the time) ftemp
> > and ftemp2 are set to 0 even though FloatArray[0] and [1] are non-zero.
> > This causes the incorrect result from the if statement.  I'm not sure
> > just what is going on here.  My program does make other calls to fabsf
> > from other tasks but I have not yet noticed incorrect operation of
> > those.  Also my project is set to use multi-threaded libraries.
> >
> > Seems like fabsf() should be a pretty simple function where not much
> > could go wrong.  Any thoughts?
>
> Make absolutely sure you have #included <math.h>.
>
> -- Paul.
>

#45899 From: Nico Christie <nicolas.christie@...>
Date: Tue Nov 10, 2009 9:53 pm
Subject: Problem with I2C initialization
nicolas_chri...
Offline Offline
Send Email Send Email
 
Hi all! I've been trying to set up an I2C link between a LPC2368 and a
device.

From this group's own "files" section, I've been adapting Owen Mooney's
"i2c_w_error.c" file for a 2368 processor, but having a little problem... it
does not start! I never measure a CLK signal or any data on the output pins.
Never mind the pull ups or even if a device is connected, the clock output
should be there... right? Using I2C1, I tried setting P0.0 and P0.1 up as
GPIO pins and changing their values with a timer, which worked ok, so the
pins are working fine.
BTW, would using the processor's own pull up with PINMODEx be enough?

I tried to make it as general as possible, allowing to change the I2C port
used at start up very easily. This is my adapted file:
___________________________________________________________
#include <LPC23xx.H>

// From <settings.h>
   #define I2C_0 0
   #define I2C_1 1
   #define I2C_2 2

   #define BAT_I2C 1

/* LPC 2368 */
#if (BAT_I2C == I2C_0)
#define POWER_BIT 7

// Port 1 - Pins 3 & 4
// Open drain outputs
#define PINSELx PINSEL1
#define PINSEL_MASK 0x000003C0 // Function = 11

#define I2CONSET I20CONSET
#define I2STAT I20STAT
#define I2DAT I20DAT
#define I2ADR I20ADR
#define I2SCLH I20SCLH
#define I2SCLL I20SCLL
#define I2CONCLR I20CONCLR
#elif (BAT_I2C == I2C_1)
#define POWER_BIT 19

// Port 0 - Pins 0 & 1
#define PINSELx PINSEL0
#define PINSEL_MASK 0x0000000F // Function = 11

#define I2CONSET I21CONSET
#define I2STAT I21STAT
#define I2DAT I21DAT
#define I2ADR I21ADR
#define I2SCLH I21SCLH
#define I2SCLL I21SCLL
#define I2CONCLR I21CONCLR
#elif (BAT_I2C == I2C_2)
#define POWER_BIT 26

// Port 0 - Pins 10 & 11
#define PINSELx PINSEL0
#define PINSEL_MASK 0x00A00000 // Function = 10

#define I2CONSET I22CONSET
#define I2STAT I22STAT
#define I2DAT I22DAT
#define I2ADR I22ADR
#define I2SCLH I22SCLH
#define I2SCLL I22SCLL
#define I2CONCLR I22CONCLR
#endif

#define STA  0x20
#define SIC  0x08
#define SI   0x08
#define STO  0x10
#define STAC 0x20
#define AA   0x04

void I2C_Init(void)
{
PINSELx  |= PINSEL_MASK; // Set pinouts as scl and sda

I2CONCLR  = 0xFF;
  I2SCLL    = 80; //  bit frec I2C  =  PCLK   / ( I2SCLL + I2SCLH )
I2SCLH    = 70; // (at 12 MHz / 4) = 3.5 MHz / (   80   +   70   ) = 80 KHz
  // I2SCLL    = 19; // speed at 100Khz for a VPB Clock Divider  = 4 at 14
MHz
// I2SCLH    = 19;
// I2SCLL    = 60; // speed at 375Khz for a VPB Clock Divider  = 1
// I2SCLH    = 70;  // Pierre Seguin's original values.

I2CONSET  = 0x40;   // Active Master Mode on I2C bus
PCONP    |= (1 << POWER_BIT);
}

unsigned char SendI2CAddress(unsigned char Addr_S)
{
unsigned char r;
I2CONCLR = 0xFF;             // clear I2C - included if User forgot to
"StopI2C()"
                                  // else this function would hang.
I2CONSET = 0x40;             // Active Master Mode on I2C bus

if((Addr_S & 0x01))           // test if it's reading
I2CONSET = STA | AA;     // set STA - allow master to acknowledge slave;
else
I2CONSET = STA;           // set STA don't allow acknowledges;
while(I2STAT != 0x08) ;         // Wait for start to be completed
I2DAT    = Addr_S;           // Charge slave Address
I2CONCLR = SIC | STAC;       // Clear i2c interrupt bit to send the data
while( ! ( I2CONSET & SI)) ; // wait till status available
r = I2STAT;                     // read Status. See standard error codes pdf
(link in manual).

if(!(Addr_S & 0x01)) // if we are doing a write
{
if (r != 0x18) {         // look for "SLA+W has been transmitted; ACK has
been received"
if ( r == 0x20 )        // check for "SLA+W has been transmitted; NOT ACK
has been received"
return 1; // no acknowledge - probably no device there. Return a 1
return r; // other error - return status code
         }
     } else {
if (r != 0x40) {            // look for "SLA+R has been transmitted; ACK has
been received"
if ( r == 0x48 ) // check for "SLA+R has been transmitted; NOT ACK has been
received"
return 1; // no acknowledge - probably no device there. Return a 1
return r; // other error - return status code
}
}
return 0;
}

unsigned char ReadI2C(void)
{
     unsigned char r;
     I2CONCLR = SIC;                 // clear SIC;
     while( ! (I2CONSET & 0x08));    // wait till status available
     r = I2STAT;                     // check for error
     if (r != 0x50){                 // look for "Data byte has been
received; ACK has been returned"
        return r;        // read fail
     }
     return I2DAT;
}

unsigned char WriteI2C(unsigned char Data)
{
     unsigned char r;
     I2DAT    = Data;                // Charge Data
     I2CONCLR = 0x08;                // SIC; Clear i2c interrupt bit to send
the data
     while( ! (I2CONSET & 0x08));    // wait till status available
     r = I2STAT;
     if (r != 0x28){                 // look for "Data byte in S1DAT has been
transmitted; ACK has been received"
        return r; // write fail
     }
return 0;
}

void StopI2C(void)
{
     I2CONCLR = SIC;
     I2CONSET = STO;
     while( I2CONSET & STO ) ;       // wait for Stopped bus I2C
}
___________________________________________________________

Any ideas? Interrupts are not used, since waiting is "while'd".

Thanks to all, regards

--
Nicolás Christie
nicolas.christie@...


[Non-text portions of this message have been removed]

#45898 From: "alexander_ribero" <alexribero@...>
Date: Tue Nov 10, 2009 9:39 pm
Subject: Re: LPC2300 vs LPC2460 Boards
alexander_ri...
Offline Offline
Send Email Send Email
 
Hola Pablo:

Both PHY devices are recommented by NXP.

The Example code provided by NXP supports both PHY.

The Micrel Website provides the PHY datasheet, but most likely you have to
register to download.

Regards,

Alex
--- In lpc2000@yahoogroups.com, Pablo Mora <pmvitoria@...> wrote:
>
> Hi all,
>
> I am designing a board with an LPC2468 and I am wondering about what
> PHY device stuff on it. Having a look at the Keil evaluation boards on
> the market, I realized that the LPC2300 eval board features a DP83848
> PHY, while the LPC2460 one features a Micrel KSZ8001L PHY device.
>
> Does anybody know why a different PHY device was used on the LPC2400 board?
>
> I was kind of decided to go for the Micrel one (because it's used on
> the LPC2400 Eval Board), but after looking at the scarce documentation
> on its web, I am doubting about what to do ...
>
> Any suggestions ? What about the software examples availability ?
>
> Thanks and best regards
>

#45897 From: "alexander_ribero" <alexribero@...>
Date: Tue Nov 10, 2009 9:36 pm
Subject: Re: frequency counter
alexander_ri...
Offline Offline
Send Email Send Email
 
Hi:

You are referring to the Input Capture Feature that the Timers have.
As soon as you enable the timer, the timer counter register starts counting.

As soon as there is an event in the Capture pin, the capture register will
"capture" the current value of the timer counter in the capture register.

I would suggest to enable both rising and falling capture events, and Interrupt
on Capture on T0CCR, so that every edge (either falling or rising) an interrupt
is generated and you can copy the content of the capture register into a buffer.
The difference between the last to measurements give you the last pulse width.

Regards,

Alex


--- In lpc2000@yahoogroups.com, "Stijn" <stijn.bluekens@...> wrote:
>
> Hi All,
>
> I'm trying to display the frequency of a signal by measuring the time between
2 pulses.
>
> Are there any suggestions on how to start with it?
> I want to use the standard timer counter function, but don't know how to
implemt it correctly.
>
> Can somebody show me some examples, or push me in the right direction?
>
> I'm using the lpc 2148 controller with the Keil compiler.
>
>
> this is what I have for now.
>
> VPBDIV  = 0x00000001;   //VPB clock is the same as processor clock
> PINSEL1  = 0x00000003; //Enable pin 0.16 as capture 0.2
> T0PR 	 = 0x0000001E;   //Load prescaler for 1 Msec tick
> T0TCR 	 = 0x00000002; //Reset counter and prescaler
> T0CCR 	 = 0x00000040; //Capture on rising edge of 0.2
> T0CTCR  = 0x00000000;   // timer mode
> T0TCR 	 = 0x00000001; //enable timer
>
> If I want to measure the time between 2 pulses, then I have to stop the timer
on the next puls, read the timervalue, reset the timer and start it again.
>
> But how can I stop the timer on the next pulse?
>
> thanks in advance!
>

#45896 From: "Paul Curtis" <plc@...>
Date: Tue Nov 10, 2009 9:26 pm
Subject: Re: fabsf problem
paul_l_curtis
Offline Offline
Send Email Send Email
 
On Tue, 10 Nov 2009 20:22:07 -0000, drproton2003 <drproton2003@...>
wrote:

> I've come across a problem with fabsf() in crossworks.  Here is a code
> snippet:
>
>   ftemp=fabsf(FloatArray[0]);
>   ftemp2=fabsf(FloatArray[1]);
>   if((ftemp<51.0f)&&(ftemp2<51.0f))
>     {
>     FloatArray[0]*=10;
>     FloatArray[1]*=10;
>     itemp=0;
>     }
>     else
>     {
>     itemp=1<<30;
>     }
>
> For some reason every once in a while (maybe 5-10% of the time) ftemp
> and ftemp2 are set to 0 even though FloatArray[0] and [1] are non-zero.
> This causes the incorrect result from the if statement.  I'm not sure
> just what is going on here.  My program does make other calls to fabsf
> from other tasks but I have not yet noticed incorrect operation of
> those.  Also my project is set to use multi-threaded libraries.
>
> Seems like fabsf() should be a pretty simple function where not much
> could go wrong.  Any thoughts?

Make absolutely sure you have #included <math.h>.

-- Paul.

#45895 From: "rtstofer" <rstofer@...>
Date: Tue Nov 10, 2009 9:22 pm
Subject: Re: interrupts of RTC
rtstofer
Offline Offline
Send Email Send Email
 
--- In lpc2000@yahoogroups.com, "capiman26061973" <mailingliste@...> wrote:
>
>
>
> Hello Richard, hello Rajun,
>
> would it not be easier if Rajun just zips the complete directory / project and
upload it to files area ?
>
> I think, there should already be a big thank you to Richard for the great
support, not only to Rajun, but also to a lot others !
>
> Regards,
>
>     Martin

Sure, zipping it up and posting it is likely to result in a working sample a lot
faster than it has been going.

The only reason I haven't posted a working RTC project is that I don't have one.
I have never used the RTC.

I almost always recommend that folks check out the excellent code at
www.jcwren.com/arm  That's where I get a lot of my code and I have learned a lot
about the overall strategy of building a large project from JC's code.

Richard

#45894 From: "Theyagu" <theyaguk_85@...>
Date: Tue Nov 10, 2009 7:54 pm
Subject: How to learn embedded c
theyaguk_85
Offline Offline
Send Email Send Email
 
hi friends, im currently doing my main project in robotics domain, im using
lpc2129, my problem is i can write the c code which can compile in turbo c
compiler, but i don't know how convert it into embedded c code suitable for my
controller,
i would like to know how to write embedded c code for access the following
peripherals,
  UART,I2C,CAN,I/O-PORT,TIMERS AND INTERRUPT ROUTINE and all,
my exact problem is i don't know how to accessing or reading pins and
configuration of register and all, i request u people pls clarify my doubt if
any body known about this, and if any materials,tutorial or EXAMPLE PROGRAMS are
available pls send to my mail
   My is "theyaguk_85@..."

regards&thanks
thiyagu,

#45893 From: Pablo Mora <pmvitoria@...>
Date: Tue Nov 10, 2009 7:48 pm
Subject: LPC2300 vs LPC2460 Boards
pablitophoto...
Offline Offline
Send Email Send Email
 
Hi all,

I am designing a board with an LPC2468 and I am wondering about what
PHY device stuff on it. Having a look at the Keil evaluation boards on
the market, I realized that the LPC2300 eval board features a DP83848
PHY, while the LPC2460 one features a Micrel KSZ8001L PHY device.

Does anybody know why a different PHY device was used on the LPC2400 board?

I was kind of decided to go for the Micrel one (because it's used on
the LPC2400 Eval Board), but after looking at the scarce documentation
on its web, I am doubting about what to do ...

Any suggestions ? What about the software examples availability ?

Thanks and best regards

#45892 From: "raju_nem" <rajun.dsp@...>
Date: Tue Nov 10, 2009 8:49 pm
Subject: Re: JTAG Programming
raju_nem
Offline Offline
Send Email Send Email
 
Thank u leon,
Any coding is required for JTAG(JTAG init function, etc..)(if i use wiggler
schematic)on PC side?can u share Rowley  CrossWorks software in the file section
area?
--- In lpc2000@yahoogroups.com, "leon Heller" <leon355@...> wrote:
>
> ----- Original Message -----
> From: "raju_nem" <rajun.dsp@...>
> To: <lpc2000@yahoogroups.com>
> Sent: Tuesday, November 10, 2009 7:31 PM
> Subject: [lpc2000] Re: JTAG Programming
>
>
> > what are JTAG softwares i need to use for this below link simple JTAG
> > schematic? can anbody  share those suggested  softwares?
> >
> >
> > http://www.frozeneskimo.com/electronics/arm-tutorials/jtag-wiggler-clone/
>
> My Wiggler clone design in the Group's Files section works witb Rowley
> CrossWorks.
>
> Leon
>

#45891 From: "leon Heller" <leon355@...>
Date: Tue Nov 10, 2009 8:30 pm
Subject: Re: Re: JTAG Programming
leon_heller
Offline Offline
Send Email Send Email
 
----- Original Message -----
From: "raju_nem" <rajun.dsp@...>
To: <lpc2000@yahoogroups.com>
Sent: Tuesday, November 10, 2009 7:31 PM
Subject: [lpc2000] Re: JTAG Programming


> what are JTAG softwares i need to use for this below link simple JTAG
> schematic? can anbody  share those suggested  softwares?
>
>
> http://www.frozeneskimo.com/electronics/arm-tutorials/jtag-wiggler-clone/

My Wiggler clone design in the Group's Files section works witb Rowley
CrossWorks.

Leon

#45890 From: "drproton2003" <drproton2003@...>
Date: Tue Nov 10, 2009 8:22 pm
Subject: fabsf problem
drproton2003
Offline Offline
Send Email Send Email
 
I've come across a problem with fabsf() in crossworks.  Here is a code snippet:

   ftemp=fabsf(FloatArray[0]);
   ftemp2=fabsf(FloatArray[1]);
   if((ftemp<51.0f)&&(ftemp2<51.0f))
     {
     FloatArray[0]*=10;
     FloatArray[1]*=10;
     itemp=0;
     }
     else
     {
     itemp=1<<30;
     }

For some reason every once in a while (maybe 5-10% of the time) ftemp and ftemp2
are set to 0 even though FloatArray[0] and [1] are non-zero.  This causes the
incorrect result from the if statement.  I'm not sure just what is going on
here.  My program does make other calls to fabsf from other tasks but I have not
yet noticed incorrect operation of those.  Also my project is set to use
multi-threaded libraries.

Seems like fabsf() should be a pretty simple function where not much could go
wrong.  Any thoughts?

#45889 From: "capiman26061973" <mailingliste@...>
Date: Tue Nov 10, 2009 7:54 pm
Subject: Re: interrupts of RTC
capiman26061973
Offline Offline
Send Email Send Email
 
Hello Richard, hello Rajun,

would it not be easier if Rajun just zips the complete directory / project and
upload it to files area ?

I think, there should already be a big thank you to Richard for the great
support, not only to Rajun, but also to a lot others !

Regards,

     Martin

--- In lpc2000@yahoogroups.com, "raju_nem" <rajun.dsp@...> wrote:
>
>
> Hi richard,
>
>  No change in the output even i made the things which r suggested by u.I.e isr
function is excuting infinetly.it is not coming to main function.still what are
the modifications i need to be done to get the expected output?
>
> --- In lpc2000@yahoogroups.com, "rtstofer" <rstofer@> wrote:
> >
> >
> >
> > --- In lpc2000@yahoogroups.com, "raju_nem" <rajun.dsp@> wrote:
> >
> > > It is giving error that undefined reference to VICVECTADDR in IRQ_Wrapper.
VICVECTADDR is same as in lpc2148.h file.still it giving error.what may be the
reason?
> >
> >
> > Near the top of the startup file, add the line:
> >
> > .set  VICVECTADDR, 0xFFFFF030
> >
> > This will define the VICVECTADDR.
> >
> > Richard
> >
>

#45888 From: "rtstofer" <rstofer@...>
Date: Tue Nov 10, 2009 7:42 pm
Subject: Re: eclipse and LPC2148
rtstofer
Offline Offline
Send Email Send Email
 
--- In lpc2000@yahoogroups.com, "rtstofer" <rstofer@...> wrote:

>
> If I get this thing to compile under YAGART (Eclipse/WinARM), I'll let you
know.
>
> Richard
>

On my x86 box with YAGARTO, I couldn't get anything to work correctly.  I have
been having a problem with YAGARTO since I upgraded a few months ago.  I haven't
tried to fix it because I don't use it.  But that machine doesn't have
networking because...

My work room is completely dismantled because we are getting new windows
tomorrow.  The kind with glass...  So, I can't reload YAGARTO and the box
doesn't have WinARM

So, I downloaded WinARM to this machine (Win7 x64) and one of the sample
programs compiled and linked just fine.  But when I tried to build Logomatic,
everything compiled just fine but the linker is bitching about the libraries
being build for hardware floating point and the project being built for software
floating point.

This floating point thing has been a nightmare for years.

When I build the GNU toolchain under Linux, I build it for software floating
point.  But that's the nice thing about doing this stuff under Linux.  I can
control every aspect of the project.

So, WinARM may not work.  YAGARTO on my x86 box doesn't work.  WinARM on my x64
box works but not for this project.

I won't have my Linux box back until Thursday at the earliest and then we aren't
using the same toolchain.

I guess I just can't help you with this project.  Good luck!

Richard

#45887 From: "raju_nem" <rajun.dsp@...>
Date: Tue Nov 10, 2009 7:36 pm
Subject: Re: interrupts of RTC
raju_nem
Offline Offline
Send Email Send Email
 
Hi richard,

  No change in the output even i made the things which r suggested by u.I.e isr
function is excuting infinetly.it is not coming to main function.still what are
the modifications i need to be done to get the expected output?

--- In lpc2000@yahoogroups.com, "rtstofer" <rstofer@...> wrote:
>
>
>
> --- In lpc2000@yahoogroups.com, "raju_nem" <rajun.dsp@> wrote:
>
> > It is giving error that undefined reference to VICVECTADDR in IRQ_Wrapper.
VICVECTADDR is same as in lpc2148.h file.still it giving error.what may be the
reason?
>
>
> Near the top of the startup file, add the line:
>
> .set  VICVECTADDR, 0xFFFFF030
>
> This will define the VICVECTADDR.
>
> Richard
>

#45886 From: "raju_nem" <rajun.dsp@...>
Date: Tue Nov 10, 2009 7:31 pm
Subject: Re: JTAG Programming
raju_nem
Offline Offline
Send Email Send Email
 
what are JTAG softwares i need to use for this below link simple JTAG schematic?
can anbody  share those suggested  softwares?


http://www.frozeneskimo.com/electronics/arm-tutorials/jtag-wiggler-clone/


i made this simple pcb board,i tested the board,no mistake in my board.Using
this board, my arm is not recognized by the Hi-tex jtag software?any body using
this schematic board successfully?help me,Thanks in advance.

--- In lpc2000@yahoogroups.com, "leon Heller" <leon355@...> wrote:
>
> ----- Original Message -----
> From: "Oto" <otomeran@...>
> To: <lpc2000@yahoogroups.com>
> Sent: Tuesday, November 10, 2009 4:06 PM
> Subject: [lpc2000] JTAG Programming
>
>
> > Hi All,
> >
> > Im new in ARMs
> >
> > I have Olimex ARM-USB-OCD and evaluation kit LPC-2378-STK.
> >
> > Im using Crossworks studio for ARM.
> >
> > I can debug, set break points, etc.
> >
> > But when i unplug and plug voltage, my program doesnt run.
> >
> > My configuration is ARM Flash Release.
> >
> > So, my question is: Can I download my program with ARM-USB-OCD to LPC2378?
>
> See STARTUP_FROM_RESET in the CrossWorks FAQs.
>
> Leon
>

#45885 From: "rtstofer" <rstofer@...>
Date: Tue Nov 10, 2009 6:43 pm
Subject: Re: eclipse and LPC2148
rtstofer
Offline Offline
Send Email Send Email
 
--- In lpc2000@yahoogroups.com, Bruce Lindsay <lindsayb37@...> wrote:
>
> Okay, I put your makefile in my top directory and I still get errors. I
> have a question about the following line in the Logomatic Makefile:
>
> CDEFS += -D__WinARM__
> ADEFS += -D__WinARM__
>
> I'm using the Code Scourcery tool chain in Linux. Do you know what they
> do or should be changed to?
>
> I may have to break down and download WinARM onto my Windows PC.
>

I would comment them out unless you change to WinARM

What errors are you getting?

Logomatic
...Includes
......<I think this subdir is empty>
...lib
......<whatever files are in the lib subdirectory
...LPCUSB
......<whatever files are in the LPCUSB subdirectory
...Main
......<whatever files are in the Main subdirectory plus>
......Makefile <the distribution Makefile>
...Makefile <the top level Makefile>

Since you are questioning the Makefile macros, I am assuming the top level
Makefile does change to the Main subdirectory and invoke 'make -C'  Right?

What errors are you getting?

I build the code using the GNU toolchain under Linux.  I have never tried to
build it using WinARM.  As that computer is still functional, I'll see what I
can find out.

I don't know what CodeSorcery has done to the GNU toolchain other than add an
IDE but I would be willing to bet that the code won't compile without
substantial changes.

If I get this thing to compile under YAGART (Eclipse/WinARM), I'll let you know.

Richard

#45884 From: Bruce Lindsay <lindsayb37@...>
Date: Tue Nov 10, 2009 5:13 pm
Subject: Re: eclipse and LPC2148
lindsayb37
Offline Offline
Send Email Send Email
 
Okay, I put your makefile in my top directory and I still get errors. I
have a question about the following line in the Logomatic Makefile:

CDEFS += -D__WinARM__
ADEFS += -D__WinARM__

I'm using the Code Scourcery tool chain in Linux. Do you know what they
do or should be changed to?

I may have to break down and download WinARM onto my Windows PC.

#45883 From: "leon Heller" <leon355@...>
Date: Tue Nov 10, 2009 4:13 pm
Subject: Re: JTAG Programming
leon_heller
Offline Offline
Send Email Send Email
 
----- Original Message -----
From: "Oto" <otomeran@...>
To: <lpc2000@yahoogroups.com>
Sent: Tuesday, November 10, 2009 4:06 PM
Subject: [lpc2000] JTAG Programming


> Hi All,
>
> Im new in ARMs
>
> I have Olimex ARM-USB-OCD and evaluation kit LPC-2378-STK.
>
> Im using Crossworks studio for ARM.
>
> I can debug, set break points, etc.
>
> But when i unplug and plug voltage, my program doesnt run.
>
> My configuration is ARM Flash Release.
>
> So, my question is: Can I download my program with ARM-USB-OCD to LPC2378?

See STARTUP_FROM_RESET in the CrossWorks FAQs.

Leon

#45882 From: "Stijn" <stijn.bluekens@...>
Date: Tue Nov 10, 2009 1:46 pm
Subject: frequency counter
stijn.bluekens
Offline Offline
Send Email Send Email
 
Hi All,

I'm trying to display the frequency of a signal by measuring the time between 2
pulses.

Are there any suggestions on how to start with it?
I want to use the standard timer counter function, but don't know how to implemt
it correctly.

Can somebody show me some examples, or push me in the right direction?

I'm using the lpc 2148 controller with the Keil compiler.


this is what I have for now.

VPBDIV  = 0x00000001;   //VPB clock is the same as processor clock
PINSEL1  = 0x00000003; //Enable pin 0.16 as capture 0.2
T0PR 	 = 0x0000001E;   //Load prescaler for 1 Msec tick
T0TCR 	 = 0x00000002; //Reset counter and prescaler
T0CCR 	 = 0x00000040; //Capture on rising edge of 0.2
T0CTCR  = 0x00000000;   // timer mode
T0TCR 	 = 0x00000001; //enable timer

If I want to measure the time between 2 pulses, then I have to stop the timer on
the next puls, read the timervalue, reset the timer and start it again.

But how can I stop the timer on the next pulse?

thanks in advance!

#45881 From: "Toby Harris" <t.harris@...>
Date: Tue Nov 10, 2009 4:05 pm
Subject: RE: [SPAM] JTAG Programming
toby_harris_...
Offline Offline
Send Email Send Email
 
This might help, and is copied from a post last week...

"Have you defined STARTUP_FROM_RESET? See the CrossWorks FAQ."


________________________________

From: lpc2000@yahoogroups.com [mailto:lpc2000@yahoogroups.com] On Behalf
Of Oto
Sent: 10 November 2009 16:06
To: lpc2000@yahoogroups.com
Subject: [SPAM] [lpc2000] JTAG Programming




Hi All,

Im new in ARMs

I have Olimex ARM-USB-OCD and evaluation kit LPC-2378-STK.

Im using Crossworks studio for ARM.

I can debug, set break points, etc.

But when i unplug and plug voltage, my program doesnt run.

My configuration is ARM Flash Release.

So, my question is: Can I download my program with ARM-USB-OCD to
LPC2378?

Than you for replies.

Oto Meran






[Non-text portions of this message have been removed]

#45880 From: "Oto" <otomeran@...>
Date: Tue Nov 10, 2009 4:06 pm
Subject: JTAG Programming
otomeran
Offline Offline
Send Email Send Email
 
Hi All,

Im new in ARMs

I have Olimex ARM-USB-OCD and evaluation kit LPC-2378-STK.

Im using Crossworks studio for ARM.

I can debug, set break points, etc.

But when i unplug and plug voltage, my program doesnt run.

My configuration is ARM Flash Release.

So, my question is: Can I download my program with ARM-USB-OCD to LPC2378?

Than you for replies.

Oto Meran

#45879 From: "jmrobert5" <jmrobert5@...>
Date: Tue Nov 10, 2009 2:09 pm
Subject: stm32 setup
jmrobert5
Offline Offline
Send Email Send Email
 
You should try also the STM32 forum over on STMicro website.
(and the stm32 example codes, very helpful)

I used this project:
http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects/arm_memcards/index.h\
tml#stm32_memcard

in order to get my dev environment off the ground, using codesourcery gcc
toolchain and programmers notepad 2 as IDE.

That project contains the only working linker scripts to my knowledge at this
time.

Good luck.


--- In lpc2000@yahoogroups.com, k5nwa <k5nwa@...> wrote:
>
> Anyone have a board package for CrossWorks for the Olimex STM32
> boards that they are willing to share?
>
> I'm extremely green with ARM and having to create one when one is not
> familiar with the CPU will most likely be an extremely frustrating experience.
>
> Thanks
>
> Cecil
> k5nwa
> www.softrockradio.org www.qrpradio.com
> <  http://parts.softrockradio.org/  >
>
> Never take life seriously. Nobody gets out alive anyway.
>

#45878 From: "rtstofer" <rstofer@...>
Date: Tue Nov 10, 2009 1:49 pm
Subject: Re: interrupts of RTC
rtstofer
Offline Offline
Send Email Send Email
 
--- In lpc2000@yahoogroups.com, "raju_nem" <rajun.dsp@...> wrote:

> It is giving error that undefined reference to VICVECTADDR in IRQ_Wrapper.
VICVECTADDR is same as in lpc2148.h file.still it giving error.what may be the
reason?


Near the top of the startup file, add the line:

.set  VICVECTADDR, 0xFFFFF030

This will define the VICVECTADDR.

Richard

#45877 From: "raju_nem" <rajun.dsp@...>
Date: Tue Nov 10, 2009 9:32 am
Subject: Re: interrupts of RTC
raju_nem
Offline Offline
Send Email Send Email
 
Hi "rtstofer"
i did same thing what u have said,is follows.

_vectors:       ldr     PC, Reset_Addr
                 ldr     PC, Undef_Addr
                 ldr     PC, SWI_Addr
                 ldr     PC, PAbt_Addr
                 ldr     PC, DAbt_Addr
                    nop
	        ldr PC, IRQ_Addr
                ldr     PC, FIQ_Addr

Reset_Addr:     .word   Reset_Handler
Undef_Addr:     .word   UNDEF_Routine
SWI_Addr:       .word   SWI_Routine
PAbt_Addr:      .word   UNDEF_Routine
DAbt_Addr:      .word   UNDEF_Routine
IRQ_Addr:       .word  IRQ_Wrapper
FIQ_Addr:       .word   FIQ_Routine
                 .word   0






IRQ_Wrapper:   stmfd sp!, { lr }
		 mrs lr, spsr

		 stmfd sp!, { r4-r5, lr }

		 ldr r4, =VICVECTADDR

		 ldr r5, [r4]

		 msr cpsr_c, #MODE_SVC|F_BIT

		 stmfd sp!, { r0-r3, r12, lr }
		 mov lr, pc
		 mov pc, r5

		 ldmfd sp!, { r0-r3, r12, lr }

		 msr cpsr_c, #MODE_IRQ|I_BIT|F_BIT

		 str lr, [r4]
		 ldmfd sp!, { r4-r5, lr }
		 msr spsr_cxsf, lr
		 ldmfd sp!, { lr }

		 subs pc, lr, #0x4


It is giving error that undefined reference to VICVECTADDR in IRQ_Wrapper.
VICVECTADDR is same as in lpc2148.h file.still it giving error.what may be the
reason?




--- In lpc2000@yahoogroups.com, "rtstofer" <rstofer@...> wrote:
>
> > _vectors:
>  ldr PC, Reset_Addr
>  ldr PC, Undef_Addr
>  ldr PC, SWI_Addr
>  ldr PC, PAbt_Addr
>  ldr PC, DAbt_Addr
>  nop
>  ldr PC, IRQ_Addr <--- LOOK AT THIS!
>  ldr PC, FIQ_Addr
>
> Yahoo helped mess up the vectors by combining the nop (checksum) instructions
with the ldr PC, IRQ_Addr
>
> Richard
>

#45876 From: "yiewcj" <benyiew@...>
Date: Tue Nov 10, 2009 2:37 am
Subject: Re: where do i input my own data through CAN?
yiewcj
Offline Offline
Send Email Send Email
 
Hi, i have another qn..
Transfer of data through CAN is by using Service Data objects(SDO) or Process
Data Object(PDO) or both?
Really hope to hear from someone soon!
Thanks!

--- In lpc2000@yahoogroups.com, "yiewcj" <benyiew@...> wrote:
>
> hi there,
> I am new in writing embedded systemn program.
> I am using Keil C software on this MCB2100.
> Can anyone tell me where can i set and input my own data through CAN for
transmit? is it through TPDO mapping parameter? or PDO?
>

#45875 From: Sutton Mehaffey <sutton@...>
Date: Tue Nov 10, 2009 2:10 am
Subject: Re: Re: USB Configuration Descriptor - LPC2148
sutton@...
Send Email Send Email
 
The question is why does that VirtualCOM code work without packed as far
as sizeof structures go? It's Keil's code and Philips made some
modifications.



Daniel Widyanto wrote:
>
> Hi,
>
> Depends on your compiler. On GCC, add:
> struct yourStructName {
> int memberA;
> } __attribute__((packed));
>
> On Realview (Keil), add:
> __packed struct yourStructName {
> int memberA;
> };
>
> Regards,
> -daniel
>
> -----Original Message-----
> From: lpc2000@yahoogroups.com <mailto:lpc2000%40yahoogroups.com>
> [mailto:lpc2000@yahoogroups.com <mailto:lpc2000%40yahoogroups.com>] On
> Behalf Of Sutton Mehaffey
> Sent: Tuesday, November 10, 2009 8:59 AM
> To: lpc2000@yahoogroups.com <mailto:lpc2000%40yahoogroups.com>
> Subject: Re: [lpc2000] Re: USB Configuration Descriptor - LPC2148
>
> It's the VirtualCOM.zip file up on the Files section. It's the last
> listing. It's in USB.H.
>
> Sutton
>
> bobtransformer wrote:
> >
> >
> >
> > --- In lpc2000@yahoogroups.com <mailto:lpc2000%40yahoogroups.com>
> <mailto:lpc2000%40yahoogroups.com>,
> > Sutton Mehaffey <sutton@...> wrote:
> > >
> > > Having an issue with my descriptor. In the VirtualCom demo package,
> > > sizeof(USB_CONFIGURATION_DESC) = 9. When I run my code, the size
> is 10,
> > > which is causing a enumeration failure. Same structure in both sets of
> > > code. Is there a setting that pads or doesn't pad structures on byte
> > > boundaries? I know it's something like this, because if I either
> have 3
> > > or 4 bytes in my structure, the sizeof is 4. In the VirtualCom, 3
> bytes
> > > is size 3.
> > > --
> > > Sutton
> > >
> >
> > Which software are you running ? I don't see USB_CONFIGURATION_DESC in
> > my LPCUSB implentation. You must be using another "package" ??
> >
> > BTW, I just got my LPCUSB working (AFAICT) on this LPC2366 chip !
> > Had to choose the USB SOFT CONNECT (USB_CONNECT) instead of USB_UP_LED.
> >
> > boB
> >
> >
>
> --
> Sutton Mehaffey
> Lookout Portable Security
> 4040 Royal Dr. #100
> Kennesaw, GA 30144
> 800-207-6269, 770-514-7999, 770-514-1285 FAX
> sutton@...
> <mailto:sutton%40lookoutportablesecurity.com>
>
>

--
Sutton Mehaffey
Lookout Portable Security
4040 Royal Dr. #100
Kennesaw, GA  30144
800-207-6269, 770-514-7999, 770-514-1285 FAX
sutton@...

#45874 From: Daniel Widyanto <daniel.widyanto@...>
Date: Tue Nov 10, 2009 1:12 am
Subject: RE: Re: USB Configuration Descriptor - LPC2148
daniel.widyanto@...
Send Email Send Email
 
Hi,

Depends on your compiler. On GCC, add:
struct yourStructName {
   int memberA;
} __attribute__((packed));

On Realview (Keil), add:
__packed struct yourStructName {
   int memberA;
};

Regards,
-daniel

-----Original Message-----
From: lpc2000@yahoogroups.com [mailto:lpc2000@yahoogroups.com] On Behalf Of
Sutton Mehaffey
Sent: Tuesday, November 10, 2009 8:59 AM
To: lpc2000@yahoogroups.com
Subject: Re: [lpc2000] Re: USB Configuration Descriptor - LPC2148

It's the VirtualCOM.zip file up on the Files section. It's the last
listing. It's in USB.H.

Sutton

bobtransformer wrote:
>
>
>
> --- In lpc2000@yahoogroups.com <mailto:lpc2000%40yahoogroups.com>,
> Sutton Mehaffey <sutton@...> wrote:
> >
> > Having an issue with my descriptor. In the VirtualCom demo package,
> > sizeof(USB_CONFIGURATION_DESC) = 9. When I run my code, the size is 10,
> > which is causing a enumeration failure. Same structure in both sets of
> > code. Is there a setting that pads or doesn't pad structures on byte
> > boundaries? I know it's something like this, because if I either have 3
> > or 4 bytes in my structure, the sizeof is 4. In the VirtualCom, 3 bytes
> > is size 3.
> > --
> > Sutton
> >
>
> Which software are you running ? I don't see USB_CONFIGURATION_DESC in
> my LPCUSB implentation. You must be using another "package" ??
>
> BTW, I just got my LPCUSB working (AFAICT) on this LPC2366 chip !
> Had to choose the USB SOFT CONNECT (USB_CONNECT) instead of USB_UP_LED.
>
> boB
>
>

--
Sutton Mehaffey
Lookout Portable Security
4040 Royal Dr. #100
Kennesaw, GA  30144
800-207-6269, 770-514-7999, 770-514-1285 FAX
sutton@...

#45873 From: Sutton Mehaffey <sutton@...>
Date: Tue Nov 10, 2009 12:59 am
Subject: Re: Re: USB Configuration Descriptor - LPC2148
sutton@...
Send Email Send Email
 
It's the VirtualCOM.zip file up on the Files section. It's the last
listing. It's in USB.H.

Sutton

bobtransformer wrote:
>
>
>
> --- In lpc2000@yahoogroups.com <mailto:lpc2000%40yahoogroups.com>,
> Sutton Mehaffey <sutton@...> wrote:
> >
> > Having an issue with my descriptor. In the VirtualCom demo package,
> > sizeof(USB_CONFIGURATION_DESC) = 9. When I run my code, the size is 10,
> > which is causing a enumeration failure. Same structure in both sets of
> > code. Is there a setting that pads or doesn't pad structures on byte
> > boundaries? I know it's something like this, because if I either have 3
> > or 4 bytes in my structure, the sizeof is 4. In the VirtualCom, 3 bytes
> > is size 3.
> > --
> > Sutton
> >
>
> Which software are you running ? I don't see USB_CONFIGURATION_DESC in
> my LPCUSB implentation. You must be using another "package" ??
>
> BTW, I just got my LPCUSB working (AFAICT) on this LPC2366 chip !
> Had to choose the USB SOFT CONNECT (USB_CONNECT) instead of USB_UP_LED.
>
> boB
>
>

--
Sutton Mehaffey
Lookout Portable Security
4040 Royal Dr. #100
Kennesaw, GA  30144
800-207-6269, 770-514-7999, 770-514-1285 FAX
sutton@...

#45872 From: "bobtransformer" <bgudgel@...>
Date: Mon Nov 9, 2009 9:29 pm
Subject: Re: USB Configuration Descriptor - LPC2148
bobtransformer
Offline Offline
Send Email Send Email
 
--- In lpc2000@yahoogroups.com, Sutton Mehaffey <sutton@...> wrote:
>
> Having an issue with my descriptor.  In the VirtualCom demo package,
> sizeof(USB_CONFIGURATION_DESC) = 9.  When I run my code, the size is 10,
> which is causing a enumeration failure.  Same structure in both sets of
> code.  Is there a setting that pads or doesn't pad structures on byte
> boundaries?  I know it's something like this, because if I either have 3
> or 4 bytes in my structure, the sizeof is 4.  In the VirtualCom, 3 bytes
> is size 3.
> --
> Sutton
>

Which software are you running ?  I don't see USB_CONFIGURATION_DESC in my
LPCUSB implentation.  You must be using another "package" ??

BTW, I just got my LPCUSB working (AFAICT) on this LPC2366 chip !
Had to choose the USB SOFT CONNECT (USB_CONNECT) instead of USB_UP_LED.

boB

Messages 45872 - 45901 of 46755   Newest  |  < Newer  |  Older >  |  Oldest
Advanced
Add to My Yahoo!      XML What's This?

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help