Yahoo Groups archive

Lpc2000

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

Thread

Jtag from k9spud

Jtag from k9spud

2006-02-24 by punkandsska123

Hi, I recently made the Jtag board from k9spud and I seem to have some 
problems with it.  I tested the parrallel port with debug and it 
works.  When I switch in Rowley Crosstudio and I try to connect the 
Wriggler I had a message box that say. 

Cannot Identify Target
Check JTAG connection


What do you think the problem is.

Thanks a lot.

Re: Jtag from k9spud

2006-02-24 by punkandsska123

--- In lpc2000@yahoogroups.com, "punkandsska123" <jeromerivard@...> 
wrote:
>
> Hi, I recently made the Jtag board from k9spud and I seem to have 
some 
> problems with it.  I tested the parrallel port with debug and it 
> works.  When I switch in Rowley Crosstudio and I try to connect the 
> Wriggler I had a message box that say. 
> 
> Cannot Identify Target
> Check JTAG connection
> 
> 
> What do you think the problem is.
> 
> Thanks a lot.
>

I forgot to says That I use a Olimex Board with a Philips 2148.

Re: [lpc2000] Jtag from k9spud

2006-02-24 by Leon Heller

----- Original Message ----- 
Show quoted textHide quoted text
From: "punkandsska123" <jeromerivard@...>
To: <lpc2000@yahoogroups.com>
Sent: Friday, February 24, 2006 6:10 PM
Subject: [lpc2000] Jtag from k9spud


> Hi, I recently made the Jtag board from k9spud and I seem to have some
> problems with it.  I tested the parrallel port with debug and it
> works.  When I switch in Rowley Crosstudio and I try to connect the
> Wriggler I had a message box that say.
>
> Cannot Identify Target
> Check JTAG connection
>
>
> What do you think the problem is.

Difficult to say. AFAIK the designer has never built one and tested it. Try 
building mine (jtag.zip), it definitely works.

Leon

Re: Jtag from k9spud

2006-02-24 by punkandsska123

--- In lpc2000@yahoogroups.com, "Leon Heller" <leon.heller@...> 
wrote:
>
> ----- Original Message ----- 
> From: "punkandsska123" <jeromerivard@...>
> To: <lpc2000@yahoogroups.com>
> Sent: Friday, February 24, 2006 6:10 PM
> Subject: [lpc2000] Jtag from k9spud
> 
> 
> > Hi, I recently made the Jtag board from k9spud and I seem to 
have some
> > problems with it.  I tested the parrallel port with debug and it
> > works.  When I switch in Rowley Crosstudio and I try to connect 
the
> > Wriggler I had a message box that say.
> >
> > Cannot Identify Target
> > Check JTAG connection
> >
> >
> > What do you think the problem is.
> 
> Difficult to say. AFAIK the designer has never built one and 
tested it. Try 
> building mine (jtag.zip), it definitely works.
> 
> Leon
>
And where can I download it ?

RE: [lpc2000] Jtag from k9spud

2006-02-24 by Paul Curtis

The cannot identify means that the CPU ID read back is either all zeroes
or all ones.

This can be caused by a number of things, all bad:

#1. TDO not correctly wired up so always reads 1.

#2. JTAG going too fast, set the JTAG divisor lower.  As you are using
an LPC2148, there is no possibility of adaptive clocking, so depending
upon how fast your CPU starts up, you may need to use a larger JTAG
divisor.

#3. TCK, TMS, and TDI not correctly wired.  In fact, any of these not
wired correctly will cause JTAG failure.  So, all in all, check out your
circuit...

--
Paul Curtis, Rowley Associates Ltd  http://www.rowley.co.uk
CrossWorks for MSP430, ARM, AVR and now MAXQ processors
Show quoted textHide quoted text
> -----Original Message-----
> From: punkandsska123 [mailto:jeromerivard@...] 
> Sent: 24 February 2006 18:16
> To: lpc2000@yahoogroups.com
> Subject: [lpc2000] Jtag from k9spud
> 
> Hi, I have make the Wriggler from www.k9spud.com/jtag.   
> 
> I try to use it with Rowley CrossStudio for Arm but it seems 
> not works.
> 
> A message box say :   
> 
> Cannot Identify Target
> Check JTAG connection.
> 
> 
> I use a Olimex board with a Philips 2148.  My original wriggler work 
> perfectly with crossstudio so parrallel port is fonctional.
> 
> What is the problem you think. ? 
> 
> 
> 
> 
> 
>  
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 
> 
> 
>

RE: [lpc2000] Re: Jtag from k9spud

2006-02-24 by Paul Curtis

Have you ensured the DBG JTAG jumper is installed (shorted)? 

--
Paul Curtis, Rowley Associates Ltd  http://www.rowley.co.uk
CrossWorks for MSP430, ARM, AVR and now MAXQ processors
Show quoted textHide quoted text
> -----Original Message-----
> From: punkandsska123 [mailto:jeromerivard@...] 
> Sent: 24 February 2006 18:18
> To: lpc2000@yahoogroups.com
> Subject: [lpc2000] Re: Jtag from k9spud
> 
> --- In lpc2000@yahoogroups.com, "punkandsska123" <jeromerivard@...> 
> wrote:
> >
> > Hi, I recently made the Jtag board from k9spud and I seem to have 
> some 
> > problems with it.  I tested the parrallel port with debug and it 
> > works.  When I switch in Rowley Crosstudio and I try to connect the 
> > Wriggler I had a message box that say. 
> > 
> > Cannot Identify Target
> > Check JTAG connection
> > 
> > 
> > What do you think the problem is.
> > 
> > Thanks a lot.
> >
> 
> I forgot to says That I use a Olimex Board with a Philips 2148.
> 
> 
> 
> 
> 
>  
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 
> 
> 
>

Re: [lpc2000] Re: Jtag from k9spud

2006-02-24 by Leon Heller

----- Original Message ----- 
Show quoted textHide quoted text
From: "punkandsska123" <jeromerivard@...>
To: <lpc2000@yahoogroups.com>
Sent: Friday, February 24, 2006 6:26 PM
Subject: [lpc2000] Re: Jtag from k9spud


> --- In lpc2000@yahoogroups.com, "Leon Heller" <leon.heller@...> 
> wrote:
>>
>> ----- Original Message ----- 
>> From: "punkandsska123" <jeromerivard@...>
>> To: <lpc2000@yahoogroups.com>
>> Sent: Friday, February 24, 2006 6:10 PM
>> Subject: [lpc2000] Jtag from k9spud
>> 
>> 
>> > Hi, I recently made the Jtag board from k9spud and I seem to 
> have some
>> > problems with it.  I tested the parrallel port with debug and it
>> > works.  When I switch in Rowley Crosstudio and I try to connect 
> the
>> > Wriggler I had a message box that say.
>> >
>> > Cannot Identify Target
>> > Check JTAG connection
>> >
>> >
>> > What do you think the problem is.
>> 
>> Difficult to say. AFAIK the designer has never built one and 
> tested it. Try 
>> building mine (jtag.zip), it definitely works.
>> 
>> Leon
>>
> And where can I download it ?

It's in the Group Files section.

Leon

RE: [lpc2000] Re: Jtag from k9spud

2006-02-24 by Paul Curtis

Hi, 

> Thanks Paul for help me.
> 
> The jumper is set and about the #2.
> 
> 
> And TDO seems to be ok.
> 
> And what is the CPU speed is needed ? 
> 
> My dividor is already to one in property.

Try increasing it, say, to 10.  If 10, doesn't work, try 100.  If that
doesn't work, your JTAG unit or board is not working properly.

--
Paul Curtis, Rowley Associates Ltd  http://www.rowley.co.uk
CrossWorks for MSP430, ARM, AVR and now MAXQ processors

Re: Jtag from k9spud

2006-02-24 by punkandsska123

--- In lpc2000@yahoogroups.com, "Leon Heller" <leon.heller@...> 
wrote:
>
> ----- Original Message ----- 
> From: "punkandsska123" <jeromerivard@...>
> To: <lpc2000@yahoogroups.com>
> Sent: Friday, February 24, 2006 6:26 PM
> Subject: [lpc2000] Re: Jtag from k9spud
> 
> 
> > --- In lpc2000@yahoogroups.com, "Leon Heller" <leon.heller@> 
> > wrote:
> >>
> >> ----- Original Message ----- 
> >> From: "punkandsska123" <jeromerivard@>
> >> To: <lpc2000@yahoogroups.com>
> >> Sent: Friday, February 24, 2006 6:10 PM
> >> Subject: [lpc2000] Jtag from k9spud
> >> 
> >> 
> >> > Hi, I recently made the Jtag board from k9spud and I seem to 
> > have some
> >> > problems with it.  I tested the parrallel port with debug and 
it
> >> > works.  When I switch in Rowley Crosstudio and I try to 
connect 
> > the
> >> > Wriggler I had a message box that say.
> >> >
> >> > Cannot Identify Target
> >> > Check JTAG connection
> >> >
> >> >
> >> > What do you think the problem is.
> >> 
> >> Difficult to say. AFAIK the designer has never built one and 
> > tested it. Try 
> >> building mine (jtag.zip), it definitely works.
> >> 
> >> Leon
> >>
> > And where can I download it ?
> 
> It's in the Group Files section.
> 
> Leon
>
Ok thanks I found it.

And your leon is compatible with rowley ?

Re: Jtag from k9spud

2006-02-24 by punkandsska123

--- In lpc2000@yahoogroups.com, "Paul Curtis" <plc@...> wrote:
>
> Have you ensured the DBG JTAG jumper is installed (shorted)? 
> 
> --
> Paul Curtis, Rowley Associates Ltd  http://www.rowley.co.uk
> CrossWorks for MSP430, ARM, AVR and now MAXQ processors
> 
> > -----Original Message-----
> > From: punkandsska123 [mailto:jeromerivard@...] 
> > Sent: 24 February 2006 18:18
> > To: lpc2000@yahoogroups.com
> > Subject: [lpc2000] Re: Jtag from k9spud
> > 
> > --- In lpc2000@yahoogroups.com, "punkandsska123" <jeromerivard@> 
> > wrote:
> > >
> > > Hi, I recently made the Jtag board from k9spud and I seem to 
have 
> > some 
> > > problems with it.  I tested the parrallel port with debug and 
it 
> > > works.  When I switch in Rowley Crosstudio and I try to 
connect the 
> > > Wriggler I had a message box that say. 
> > > 
> > > Cannot Identify Target
> > > Check JTAG connection
> > > 
> > > 
> > > What do you think the problem is.
> > > 
> > > Thanks a lot.
> > >
> > 
> > I forgot to says That I use a Olimex Board with a Philips 2148.
> > 
> > 
> > 
> > 
> > 
> >  
> > Yahoo! Groups Links
> > 
> > 
> > 
> >  
> > 
> > 
> > 
> > 
> >
>

Thanks Paul for help me.

The jumper is set and about the #2.


And TDO seems to be ok.

And what is the CPU speed is needed ? 

My dividor is already to one in property.

Re: [lpc2000] Re: Jtag from k9spud

2006-02-24 by Leon Heller

----- Original Message ----- 
Show quoted textHide quoted text
From: "punkandsska123" <jeromerivard@...>
To: <lpc2000@yahoogroups.com>
Sent: Friday, February 24, 2006 7:13 PM
Subject: [lpc2000] Re: Jtag from k9spud


> --- In lpc2000@yahoogroups.com, "Leon Heller" <leon.heller@...>
> wrote:
>>
>> ----- Original Message ----- 
>> From: "punkandsska123" <jeromerivard@...>
>> To: <lpc2000@yahoogroups.com>
>> Sent: Friday, February 24, 2006 6:26 PM
>> Subject: [lpc2000] Re: Jtag from k9spud
>>
>>
>> > --- In lpc2000@yahoogroups.com, "Leon Heller" <leon.heller@>
>> > wrote:
>> >>
>> >> ----- Original Message ----- 
>> >> From: "punkandsska123" <jeromerivard@>
>> >> To: <lpc2000@yahoogroups.com>
>> >> Sent: Friday, February 24, 2006 6:10 PM
>> >> Subject: [lpc2000] Jtag from k9spud
>> >>
>> >>
>> >> > Hi, I recently made the Jtag board from k9spud and I seem to
>> > have some
>> >> > problems with it.  I tested the parrallel port with debug and
> it
>> >> > works.  When I switch in Rowley Crosstudio and I try to
> connect
>> > the
>> >> > Wriggler I had a message box that say.
>> >> >
>> >> > Cannot Identify Target
>> >> > Check JTAG connection
>> >> >
>> >> >
>> >> > What do you think the problem is.
>> >>
>> >> Difficult to say. AFAIK the designer has never built one and
>> > tested it. Try
>> >> building mine (jtag.zip), it definitely works.
>> >>
>> >> Leon
>> >>
>> > And where can I download it ?
>>
>> It's in the Group Files section.
>>
>> Leon
>>
> Ok thanks I found it.
>
> And your leon is compatible with rowley ?

Yes, it works OK with their software. Just select 20-pin Wiggler. I prefer 
the Rowley CrossConnect that I have, of course. It's a lot faster and uses 
USB. I also have a genuine Wiggler and an Amontec Chameleon - a plethora of 
JTAG interfaces. 8-)

Leon
--
Leon Heller, G1HSM
leon.heller@...
http://www.geocities.com/leon_heller

PWM output

2006-02-24 by Herbert Demmel

Hi,

I seem to miss something with setting up PWM5 output - the routine below 
sometimes works, sometimes not (depending non additional code - this 
versions below currentlly does NOT work).

Any idea what I miss to setup?

Thanks for your input.

Regards
Herbert

#include <LPC213x.H>                    /* LPC213x definitions  */

#define TICKS_PER_US            15

void io_alarm_out(unsigned int freq)
{
         // match register 0 controls the cycle frequency
         PWMMR0 = 1000000 * TICKS_PER_US / freq;

         // we want to have a duty cycle of 50% so always set PWMMR5 to 
half of PWMMR0
         PWMMR5 = PWMMR0 / 2;

         // enable PWM5 output
         PWMPCR |= (0x01 << 13);
}

int main(void)
{
         // --- PWM5 setup ---

         // Enable P0.21 to be PWM5
         PINSEL1 |= (0x01 << 10);
         PWMTCR = 1;             // enable PWM timer, let shadow register 
disabled

         // reset PWM timer when PWMMR0 matches
         PWMMCR = 0x2;

         // gives 1000Hz
         io_alarm_out(1000);

         while (1)
                 ;
}


----------------------------------------------------------
demmel products
Radnitzkygasse 43
A-1100 Vienna / Austria / Europe
Voice: +43-1-6894700-0
Fax: +43-1-6894700-40
Email: dh@...
WWW: http://www.demmel.com

Re: [lpc2000] PWM output

2006-02-25 by Sten

Herbert Demmel wrote:
> Hi,
> 
> I seem to miss something with setting up PWM5 output - the routine below 
> sometimes works, sometimes not (depending non additional code - this 
> versions below currentlly does NOT work).
> 
> Any idea what I miss to setup?
> 
> Thanks for your input.
> 
> Regards
> Herbert
> 
> #include <LPC213x.H>                    /* LPC213x definitions  */
> 
> #define TICKS_PER_US            15
> 
> void io_alarm_out(unsigned int freq)
> {

	PWMTCR = (1ul << 0) | (1ul << 1);	/* Enter reset state and force counter to zero*/

>          // match register 0 controls the cycle frequency
>          PWMMR0 = 1000000 * TICKS_PER_US / freq;
> 
>          // we want to have a duty cycle of 50% so always set PWMMR5 to 
> half of PWMMR0
>          PWMMR5 = PWMMR0 / 2;
> 
>          // enable PWM5 output
>          PWMPCR |= (0x01 << 13);

	PWMTCR = (1ul << 0) | (1ul << 3);	/* Re-enable PWM */

> }
> 
> int main(void)
> {
>          // --- PWM5 setup ---
> 
>          // Enable P0.21 to be PWM5
>          PINSEL1 |= (0x01 << 10);
>          PWMTCR = 1;             // enable PWM timer, let shadow register 
> disabled
> 
>          // reset PWM timer when PWMMR0 matches
        //  PWMMCR = 0x2;
> 
>          // gives 1000Hz
>          io_alarm_out(1000);
> 
>          while (1)
>                  ;
> }
> 

Hallo Herbert,

Mmmmh, don't you need to turn on PWM module in PCONP? Or do you let all peripherials active on
startup by default?

But bit #3 in PWMTCR enables PWM module. Description of this bit says:
"When one, PWM mode is enabled. PWM mode causes shadow registers..." (2294's datasheet, p.233)

After you have enabled PWM module (if bit #3 in PWMTCR is set) and set up a value in a PWMMRx
register you just need to set the appropriated bit in PWMLER register to take effect of new PWMMRx
value.

You do not need using PWMLER register if you hold PWM in reset state during changing PWMMRx values
(see changes above).

Try it!
  Sten

-- 
/************************************************
 Do you need a tiny and efficient real time
 operating system (RTOS) with a preemtive
 multitasking for LPC2000 or AT91SAM7?

   http://nanortos.net-attack.de/

 Or some open-source tools and code for LPC2000?

   http://www.net-attack.de/

************************************************/

Re: [lpc2000] PWM output

2006-02-25 by Sten

Sten wrote:
> Herbert Demmel wrote:
> 
>>Hi,
>>
>>I seem to miss something with setting up PWM5 output - the routine below 
>>sometimes works, sometimes not (depending non additional code - this 
>>versions below currentlly does NOT work).
>>
>>Any idea what I miss to setup?
>>
>>Thanks for your input.
>>
>>Regards
>>Herbert
>>
>>#include <LPC213x.H>                    /* LPC213x definitions  */
>>
>>#define TICKS_PER_US            15
>>
>>void io_alarm_out(unsigned int freq)
>>{
> 
> 
> 	PWMTCR = (1ul << 0) | (1ul << 1);	/* Enter reset state and force counter to zero*/
> 
> 
>>         // match register 0 controls the cycle frequency
>>         PWMMR0 = 1000000 * TICKS_PER_US / freq;
>>
>>         // we want to have a duty cycle of 50% so always set PWMMR5 to 
>>half of PWMMR0
>>         PWMMR5 = PWMMR0 / 2;
>>
>>         // enable PWM5 output
>>         PWMPCR |= (0x01 << 13);
> 
> 
> 	PWMTCR = (1ul << 0) | (1ul << 3);	/* Re-enable PWM */
> 
> 
>>}
>>
>>int main(void)
>>{
>>         // --- PWM5 setup ---
>>
>>         // Enable P0.21 to be PWM5
>>         PINSEL1 |= (0x01 << 10);
>>         PWMTCR = 1;             // enable PWM timer, let shadow register 
>>disabled
>>
>>         // reset PWM timer when PWMMR0 matches
> 
>         //  PWMMCR = 0x2;
> 
>>         // gives 1000Hz
>>         io_alarm_out(1000);
>>
>>         while (1)
>>                 ;
>>}
>>
> 
> 
> Hallo Herbert,
> 
> Mmmmh, don't you need to turn on PWM module in PCONP? Or do you let all peripherials active on
> startup by default?
> 
> But bit #3 in PWMTCR enables PWM module. Description of this bit says:
> "When one, PWM mode is enabled. PWM mode causes shadow registers..." (2294's datasheet, p.233)
> 
> After you have enabled PWM module (if bit #3 in PWMTCR is set) and set up a value in a PWMMRx
> register you just need to set the appropriated bit in PWMLER register to take effect of new PWMMRx
> value.
> 
> You do not need using PWMLER register if you hold PWM in reset state during changing PWMMRx values
> (see changes above).
> 
> Try it!
>   Sten
> 

Oooops, sorry! Do not comment PWMMCR in main(). But you can uncomment PWMTCR statement instead.

  Sten

-- 
/************************************************
 Do you need a tiny and efficient real time
 operating system (RTOS) with a preemtive
 multitasking for LPC2000 or AT91SAM7?

   http://nanortos.net-attack.de/

 Or some open-source tools and code for LPC2000?

   http://www.net-attack.de/

************************************************/

Re: [lpc2000] PWM output

2006-02-25 by Herbert Demmel

Sten,

thank you for your valuable input. I've now changed the source code 
according to your comments and turned on power for PWM0 (although it should 
be on, the code below is the only code currently running) but it does not 
work yet.

I'm using a LPC2136 with Keil C V.2.42

Any further ideas why the stuff does not work???

Regards
Herbert

-------------

#include <LPC213x.H>                    /* LPC213x definitions  */

#define TICKS_PER_US            15

void io_alarm_out(unsigned int freq)
{
         PWMTCR = (0x01 << 0) | (0x01 << 1);      // Enter reset state and 
force counter to zero

         // match register 0 controls the cycle frequency
         PWMMR0 = 1000000 * TICKS_PER_US / freq;

         // we want to have a duty cycle of 50% so always set PWMMR5 to 
half of PWMMR0
         PWMMR5 = PWMMR0 / 2;

         // enable PWM5 output
         PWMPCR |= (0x01 << 13);

         PWMTCR = (0x01 << 0) | (0x01 << 3);      // Re-enable PWM
}

int main(void)
{
         // Turn on power control for PWM0
         PCONP |= (0x01 << 5);

         // --- PWM5 setup ---

         // Enable P0.21 to be PWM5
         PINSEL1 |= (0x01 << 10);
         // PWMTCR = 1;          // enable PWM timer, let shadow register 
disabled

         // reset PWM timer when PWMMR0 matches
         PWMMCR = 0x2;

         // gives 1000Hz
         io_alarm_out(1000);

         while (1)
                 ;
}
-------------

At 09:27 25.02.2006 +0100, you wrote:
>Sten wrote:
> > Herbert Demmel wrote:
> >
> >>Hi,
> >>
> >>I seem to miss something with setting up PWM5 output - the routine below
> >>sometimes works, sometimes not (depending non additional code - this
> >>versions below currentlly does NOT work).
> >>
> >>Any idea what I miss to setup?
> >>
> >>Thanks for your input.
> >>
> >>Regards
> >>Herbert
> >>
> >>#include <LPC213x.H>                    /* LPC213x definitions  */
> >>
> >>#define TICKS_PER_US            15
> >>
> >>void io_alarm_out(unsigned int freq)
> >>{
> >
> >
> >       PWMTCR = (1ul << 0) | (1ul << 1);      /* Enter reset state and 
> force counter to zero*/
> >
> >
> >>         // match register 0 controls the cycle frequency
> >>         PWMMR0 = 1000000 * TICKS_PER_US / freq;
> >>
> >>         // we want to have a duty cycle of 50% so always set PWMMR5 to
> >>half of PWMMR0
> >>         PWMMR5 = PWMMR0 / 2;
> >>
> >>         // enable PWM5 output
> >>         PWMPCR |= (0x01 << 13);
> >
> >
> >       PWMTCR = (1ul << 0) | (1ul << 3);      /* Re-enable PWM */
> >
> >
> >>}
> >>
> >>int main(void)
> >>{
> >>         // --- PWM5 setup ---
> >>
> >>         // Enable P0.21 to be PWM5
> >>         PINSEL1 |= (0x01 << 10);
> >>         PWMTCR = 1;             // enable PWM timer, let shadow register
> >>disabled
> >>
> >>         // reset PWM timer when PWMMR0 matches
> >
> >         //  PWMMCR = 0x2;
> >
> >>         // gives 1000Hz
> >>         io_alarm_out(1000);
> >>
> >>         while (1)
> >>                 ;
> >>}
> >>
> >
> >
> > Hallo Herbert,
> >
> > Mmmmh, don't you need to turn on PWM module in PCONP? Or do you let all 
> peripherials active on
> > startup by default?
> >
> > But bit #3 in PWMTCR enables PWM module. Description of this bit says:
> > "When one, PWM mode is enabled. PWM mode causes shadow registers..." 
> (2294's datasheet, p.233)
> >
> > After you have enabled PWM module (if bit #3 in PWMTCR is set) and set 
> up a value in a PWMMRx
> > register you just need to set the appropriated bit in PWMLER register 
> to take effect of new PWMMRx
> > value.
> >
> > You do not need using PWMLER register if you hold PWM in reset state 
> during changing PWMMRx values
> > (see changes above).
> >
> > Try it!
> >   Sten
> >
>
>Oooops, sorry! Do not comment PWMMCR in main(). But you can uncomment 
>PWMTCR statement instead.
>
>   Sten
>
>--
>/************************************************
>Do you need a tiny and efficient real time
>operating system (RTOS) with a preemtive
>multitasking for LPC2000 or AT91SAM7?
>
>    <http://nanortos.net-attack.de/>http://nanortos.net-attack.de/
>
>Or some open-source tools and code for LPC2000?
>
>    <http://www.net-attack.de/>http://www.net-attack.de/
>
>************************************************/
>
>
>SPONSORED LINKS
><http://groups.yahoo.com/gads?t=ms&k=Microcontrollers&w1=Microcontrollers&w2=Microprocessor&w3=Intel+microprocessors&w4=Pic+microcontrollers&c=4&s=95&.sig=mfaAujKZXA2Z_vxre9sGnQ>Microcontrollers 
><http://groups.yahoo.com/gads?t=ms&k=Microprocessor&w1=Microcontrollers&w2=Microprocessor&w3=Intel+microprocessors&w4=Pic+microcontrollers&c=4&s=95&.sig=9jjd2D3GOLIESVQssLmLsA>Microprocessor 
><http://groups.yahoo.com/gads?t=ms&k=Intel+microprocessors&w1=Microcontrollers&w2=Microprocessor&w3=Intel+microprocessors&w4=Pic+microcontrollers&c=4&s=95&.sig=OMnZuqMZX95mgutt4B-tDw>Intel 
>microprocessors
><http://groups.yahoo.com/gads?t=ms&k=Pic+microcontrollers&w1=Microcontrollers&w2=Microprocessor&w3=Intel+microprocessors&w4=Pic+microcontrollers&c=4&s=95&.sig=Malspbd0T4Rq3M4Q0nHrfw>Pic 
>microcontrollers
>
>
>----------
>YAHOO! GROUPS LINKS
>
>    *  Visit your group "<http://groups.yahoo.com/group/lpc2000>lpc2000" 
> on the web.
>    *
>    *  To unsubscribe from this group, send an email to:
>    * 
> <mailto:lpc2000-unsubscribe@yahoogroups.com?subject=Unsubscribe>lpc2000-unsubscribe@yahoogroups.com 
>
>    *
>    *  Your use of Yahoo! Groups is subject to the 
> <http://docs.yahoo.com/info/terms/>Yahoo! Terms of Service.
>
>
>----------

----------------------------------------------------------
demmel products
Radnitzkygasse 43
A-1100 Vienna / Austria / Europe
Voice: +43-1-6894700-0
Fax: +43-1-6894700-40
Email: dh@...
WWW: http://www.demmel.com


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

Re: [lpc2000] PWM output

2006-02-25 by Herbert Demmel

Sten,

Sorry, the code now works, I just forgot to enable the "Run application 
after download" in my test program, so the test program never started (my 
original application did and had the problem not to start the PWM).

Thanks a lot
Herbert

At 12:53 25.02.2006 +0100, you wrote:
>Sten,
>
>thank you for your valuable input. I've now changed the source code
>according to your comments and turned on power for PWM0 (although it should
>be on, the code below is the only code currently running) but it does not
>work yet.
>
>I'm using a LPC2136 with Keil C V.2.42
>
>Any further ideas why the stuff does not work???
>
>Regards
>Herbert
>
>-------------
>
>#include <LPC213x.H>                    /* LPC213x definitions  */
>
>#define TICKS_PER_US            15
>
>void io_alarm_out(unsigned int freq)
>{
>          PWMTCR = (0x01 << 0) | (0x01 << 1);      // Enter reset state and
>force counter to zero
>
>          // match register 0 controls the cycle frequency
>          PWMMR0 = 1000000 * TICKS_PER_US / freq;
>
>          // we want to have a duty cycle of 50% so always set PWMMR5 to
>half of PWMMR0
>          PWMMR5 = PWMMR0 / 2;
>
>          // enable PWM5 output
>          PWMPCR |= (0x01 << 13);
>
>          PWMTCR = (0x01 << 0) | (0x01 << 3);      // Re-enable PWM
>}
>
>int main(void)
>{
>          // Turn on power control for PWM0
>          PCONP |= (0x01 << 5);
>
>          // --- PWM5 setup ---
>
>          // Enable P0.21 to be PWM5
>          PINSEL1 |= (0x01 << 10);
>          // PWMTCR = 1;          // enable PWM timer, let shadow register
>disabled
>
>          // reset PWM timer when PWMMR0 matches
>          PWMMCR = 0x2;
>
>          // gives 1000Hz
>          io_alarm_out(1000);
>
>          while (1)
>                  ;
>}
>-------------
>
>At 09:27 25.02.2006 +0100, you wrote:
> >Sten wrote:
> > > Herbert Demmel wrote:
> > >
> > >>Hi,
> > >>
> > >>I seem to miss something with setting up PWM5 output - the routine below
> > >>sometimes works, sometimes not (depending non additional code - this
> > >>versions below currentlly does NOT work).
> > >>
> > >>Any idea what I miss to setup?
> > >>
> > >>Thanks for your input.
> > >>
> > >>Regards
> > >>Herbert
> > >>
> > >>#include <LPC213x.H>                    /* LPC213x definitions  */
> > >>
> > >>#define TICKS_PER_US            15
> > >>
> > >>void io_alarm_out(unsigned int freq)
> > >>{
> > >
> > >
> > >       PWMTCR = (1ul << 0) | (1ul << 1);      /* Enter reset state and
> > force counter to zero*/
> > >
> > >
> > >>         // match register 0 controls the cycle frequency
> > >>         PWMMR0 = 1000000 * TICKS_PER_US / freq;
> > >>
> > >>         // we want to have a duty cycle of 50% so always set PWMMR5 to
> > >>half of PWMMR0
> > >>         PWMMR5 = PWMMR0 / 2;
> > >>
> > >>         // enable PWM5 output
> > >>         PWMPCR |= (0x01 << 13);
> > >
> > >
> > >       PWMTCR = (1ul << 0) | (1ul << 3);      /* Re-enable PWM */
> > >
> > >
> > >>}
> > >>
> > >>int main(void)
> > >>{
> > >>         // --- PWM5 setup ---
> > >>
> > >>         // Enable P0.21 to be PWM5
> > >>         PINSEL1 |= (0x01 << 10);
> > >>         PWMTCR = 1;             // enable PWM timer, let shadow register
> > >>disabled
> > >>
> > >>         // reset PWM timer when PWMMR0 matches
> > >
> > >         //  PWMMCR = 0x2;
> > >
> > >>         // gives 1000Hz
> > >>         io_alarm_out(1000);
> > >>
> > >>         while (1)
> > >>                 ;
> > >>}
> > >>
> > >
> > >
> > > Hallo Herbert,
> > >
> > > Mmmmh, don't you need to turn on PWM module in PCONP? Or do you let all
> > peripherials active on
> > > startup by default?
> > >
> > > But bit #3 in PWMTCR enables PWM module. Description of this bit says:
> > > "When one, PWM mode is enabled. PWM mode causes shadow registers..."
> > (2294's datasheet, p.233)
> > >
> > > After you have enabled PWM module (if bit #3 in PWMTCR is set) and set
> > up a value in a PWMMRx
> > > register you just need to set the appropriated bit in PWMLER register
> > to take effect of new PWMMRx
> > > value.
> > >
> > > You do not need using PWMLER register if you hold PWM in reset state
> > during changing PWMMRx values
> > > (see changes above).
> > >
> > > Try it!
> > >   Sten
> > >
> >
> >Oooops, sorry! Do not comment PWMMCR in main(). But you can uncomment
> >PWMTCR statement instead.
> >
> >   Sten
> >
> >--
> >/************************************************
> >Do you need a tiny and efficient real time
> >operating system (RTOS) with a preemtive
> >multitasking for LPC2000 or AT91SAM7?
> >
> > 
> <<http://nanortos.net-attack.de/>http://nanortos.net-attack.de/>http://nanortos.net-attack.de/
> >
> >Or some open-source tools and code for LPC2000?
> >
> > 
> <<http://www.net-attack.de/>http://www.net-attack.de/>http://www.net-attack.de/
> >
> >************************************************/
> >
> >
> >SPONSORED LINKS
> ><<http://groups.yahoo.com/gads?t=ms&k=Microcontrollers&w1=Microcontroller 
> s&w2=Microprocessor&w3=Intel+microprocessors&w4=Pic+microcontrollers&c=4&s=95&.sig=mfaAujKZXA2Z_vxre9sGnQ>http://groups.yahoo.com/gads?t=ms&k=Microcontrollers&w1=Microcontrollers&w2=Microprocessor&w3=Intel+microprocessors&w4=Pic+microcontrollers&c=4&s=95&.sig=mfaAujKZXA2Z_vxre9sGnQ>Microcontrollers 
>
> ><<http://groups.yahoo.com/gads?t=ms&k=Microprocessor&w1=Microcontrollers& 
> w2=Microprocessor&w3=Intel+microprocessors&w4=Pic+microcontrollers&c=4&s=95&.sig=9jjd2D3GOLIESVQssLmLsA>http://groups.yahoo.com/gads?t=ms&k=Microprocessor&w1=Microcontrollers&w2=Microprocessor&w3=Intel+microprocessors&w4=Pic+microcontrollers&c=4&s=95&.sig=9jjd2D3GOLIESVQssLmLsA>Microprocessor 
>
> ><<http://groups.yahoo.com/gads?t=ms&k=Intel+microprocessors&w1=Microcontr 
> ollers&w2=Microprocessor&w3=Intel+microprocessors&w4=Pic+microcontrollers&c=4&s=95&.sig=OMnZuqMZX95mgutt4B-tDw>http://groups.yahoo.com/gads?t=ms&k=Intel+microprocessors&w1=Microcontrollers&w2=Microprocessor&w3=Intel+microprocessors&w4=Pic+microcontrollers&c=4&s=95&.sig=OMnZuqMZX95mgutt4B-tDw>Intel 
>
> >microprocessors
> ><<http://groups.yahoo.com/gads?t=ms&k=Pic+microcontrollers&w1=Microcontro 
> llers&w2=Microprocessor&w3=Intel+microprocessors&w4=Pic+microcontrollers&c=4&s=95&.sig=Malspbd0T4Rq3M4Q0nHrfw>http://groups.yahoo.com/gads?t=ms&k=Pic+microcontrollers&w1=Microcontrollers&w2=Microprocessor&w3=Intel+microprocessors&w4=Pic+microcontrollers&c=4&s=95&.sig=Malspbd0T4Rq3M4Q0nHrfw>Pic 
>
> >microcontrollers
> >
> >
> >----------
> >YAHOO! GROUPS LINKS
> >
> >    *  Visit your group 
> "<<http://groups.yahoo.com/group/lpc2000>http://groups.yahoo.com/group/lpc2000>lpc2000" 
>
> > on the web.
> >    *
> >    *  To unsubscribe from this group, send an email to:
> >    *
> > 
> <mailto:lpc2000-unsubscribe@yahoogroups.com?subject=Unsubscribe>lpc2000-unsubscribe@yahoogroups.com 
>
> >
> >    *
> >    *  Your use of Yahoo! Groups is subject to the
> > 
> <<http://docs.yahoo.com/info/terms/>http://docs.yahoo.com/info/terms/>Yahoo! 
> Terms of Service.
> >
> >
> >----------
>
>----------------------------------------------------------
>demmel products
>Radnitzkygasse 43
>A-1100 Vienna / Austria / Europe
>Voice: +43-1-6894700-0
>Fax: +43-1-6894700-40
>Email: dh@...
>WWW: <http://www.demmel.com>http://www.demmel.com
>
>
>[Non-text portions of this message have been removed]
>
>
>
>SPONSORED LINKS
><http://groups.yahoo.com/gads?t=ms&k=Microcontrollers&w1=Microcontrollers&w2=Microprocessor&w3=Intel+microprocessors&w4=Pic+microcontrollers&c=4&s=95&.sig=mfaAujKZXA2Z_vxre9sGnQ>Microcontrollers 
><http://groups.yahoo.com/gads?t=ms&k=Microprocessor&w1=Microcontrollers&w2=Microprocessor&w3=Intel+microprocessors&w4=Pic+microcontrollers&c=4&s=95&.sig=9jjd2D3GOLIESVQssLmLsA>Microprocessor 
><http://groups.yahoo.com/gads?t=ms&k=Intel+microprocessors&w1=Microcontrollers&w2=Microprocessor&w3=Intel+microprocessors&w4=Pic+microcontrollers&c=4&s=95&.sig=OMnZuqMZX95mgutt4B-tDw>Intel 
>microprocessors
><http://groups.yahoo.com/gads?t=ms&k=Pic+microcontrollers&w1=Microcontrollers&w2=Microprocessor&w3=Intel+microprocessors&w4=Pic+microcontrollers&c=4&s=95&.sig=Malspbd0T4Rq3M4Q0nHrfw>Pic 
>microcontrollers
>
>
>----------
>YAHOO! GROUPS LINKS
>
>    *  Visit your group "<http://groups.yahoo.com/group/lpc2000>lpc2000" 
> on the web.
>    *
>    *  To unsubscribe from this group, send an email to:
>    * 
> <mailto:lpc2000-unsubscribe@yahoogroups.com?subject=Unsubscribe>lpc2000-unsubscribe@yahoogroups.com 
>
>    *
>    *  Your use of Yahoo! Groups is subject to the 
> <http://docs.yahoo.com/info/terms/>Yahoo! Terms of Service.
>
>
>----------

----------------------------------------------------------
demmel products
Radnitzkygasse 43
A-1100 Vienna / Austria / Europe
Voice: +43-1-6894700-0
Fax: +43-1-6894700-40
Email: dh@...
WWW: http://www.demmel.com


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

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.