Reply by Bob T April 4, 20102010-04-04
--- In l..., "Andrew Kohlsmith (mailing lists account)" wrote:
>
> On Sunday 04 April 2010 08:46:51 am Ahmad wrote:
> > For timekeeping, though, I do use the 32KHz RTC crystal. So when I want to
> > switch off (power down or deep power-down) and be woken at a given time, I
> > spend far less power.
>
> Could you give me some more details about how you're doing this? I am trying
> to utilize deep sleep on an LPC2103 but I can't seem to stay in deep sleep. I
> am trying to use EINT0 to wake up from sleep, and it seems that I wake up
> immediately no matter what I try. (EINT0 is pulled to +3.3, it is connected to
> a button that grounds it when pressed.)
>
> If I use the NON-RTC sleep modes things seem to work fine, but the RTC deep
> sleep is eluding me.
>
> Regards,
> Andrew
>
Andrew,
just one question. Are you using the RTC oscillator and have it connected to a 32 kHz crystal? Was not sure if you do because the description of your issues could indicate that you have just one clock source on the chip.
Best, Bob

An Engineer's Guide to the LPC2100 Series

Reply by "Andrew Kohlsmith (mailing lists account)" April 4, 20102010-04-04
On Sunday 04 April 2010 08:46:51 am Ahmad wrote:
> For timekeeping, though, I do use the 32KHz RTC crystal. So when I want to
> switch off (power down or deep power-down) and be woken at a given time, I
> spend far less power.

Could you give me some more details about how you're doing this? I am trying
to utilize deep sleep on an LPC2103 but I can't seem to stay in deep sleep. I
am trying to use EINT0 to wake up from sleep, and it seems that I wake up
immediately no matter what I try. (EINT0 is pulled to +3.3, it is connected to
a button that grounds it when pressed.)

If I use the NON-RTC sleep modes things seem to work fine, but the RTC deep
sleep is eluding me.

Regards,
Andrew

Reply by Ahmad April 4, 20102010-04-04
Agreed with all of the above. I do not use the CAN or the USB, which is why
I can happily do without the external crystal oscillator.

For timekeeping, though, I do use the 32KHz RTC crystal. So when I want to
switch off (power down or deep power-down) and be woken at a given time, I
spend far less power.

In this age of quick answers, a pros and cons list like on this thread would
help the newbies!

:-)

Ahmad
On Sun, Apr 4, 2010 at 4:26 AM, Bob T wrote:

>
> > > the NXP2365 family, or the NXP1765 family (Cortex).
> >
> > The Cortex M0/M3 chips from NXP have an IRC (LPC1100, LPC1300 and LPC1700
> anyway), but there are a number of limitations when using the IRC. You
> should probably avoid using it as the main clock source unless there is a
> good reason not to have an external crystal (space, extremely tight budget,
> etc.). If you want to use USB on the lpc1343, for example ... and the very
> convenient USB bootloader ... you need to use an external crystal since the
> IRC isn't accurate enough. I assume the LPC1700 family is the same.
>
> Using the internal RC oscillator has a number of advantages and
> disadvantages:
> Pro:
> More reliable than external crystal
> Faster startup important for periodic wake up
> lower cost
>
> Con:
> No real-time clock can be used for time tracking derived from this one
> No USB functionality supported
> No CAN functionality supported
>
> In some applications you might want to switch between external crystal and
> internal OSC. While in a sleep mode with periodic wakeup, the internal osc
> provides MUCH better power numbers because the system is longer in sleep
> mode. While active, you could switch to crystal and use USB and CAN.
>
> Just my 2 cent
>
> Happy Eastereggs, Bob
> http://www.mcu-related.com
>
>
>
Reply by Bob T April 3, 20102010-04-03
> > the NXP2365 family, or the NXP1765 family (Cortex).
>
> The Cortex M0/M3 chips from NXP have an IRC (LPC1100, LPC1300 and LPC1700 anyway), but there are a number of limitations when using the IRC. You should probably avoid using it as the main clock source unless there is a good reason not to have an external crystal (space, extremely tight budget, etc.). If you want to use USB on the lpc1343, for example ... and the very convenient USB bootloader ... you need to use an external crystal since the IRC isn't accurate enough. I assume the LPC1700 family is the same.

Using the internal RC oscillator has a number of advantages and disadvantages:
Pro:
More reliable than external crystal
Faster startup important for periodic wake up
lower cost

Con:
No real-time clock can be used for time tracking derived from this one
No USB functionality supported
No CAN functionality supported

In some applications you might want to switch between external crystal and internal OSC. While in a sleep mode with periodic wakeup, the internal osc provides MUCH better power numbers because the system is longer in sleep mode. While active, you could switch to crystal and use USB and CAN.

Just my 2 cent

Happy Eastereggs, Bob
http://www.mcu-related.com

Reply by kevin_townsend2 April 3, 20102010-04-03
> So it is clear that a crystal IS needed to generate your clock, and also
> clear that this processor does not have an internal clock source. But there
> are others in the NXP stable that do have an internal RC oscillator, such as
> the NXP2365 family, or the NXP1765 family (Cortex).

The Cortex M0/M3 chips from NXP have an IRC (LPC1100, LPC1300 and LPC1700 anyway), but there are a number of limitations when using the IRC. You should probably avoid using it as the main clock source unless there is a good reason not to have an external crystal (space, extremely tight budget, etc.). If you want to use USB on the lpc1343, for example ... and the very convenient USB bootloader ... you need to use an external crystal since the IRC isn't accurate enough. I assume the LPC1700 family is the same.

There is also a WDTOSC (watchdog timer oscillator) on the LPC1100/LPC1300 chips which can be used to generate the clock signal, albeit at a very slow clock speed ... but it can be useful when entering deep-sleep modes to run from the WDTOSC and wakeup with a timer.

For the LPC2148, though, you definately need an external crystal. If it's a new design, you may want to consider a LPC1700 (Cortex-M3) device since they are more powerful, have lower power consumption, and are a bit cheaper than the 2148 on places like Digikey, though being new there is less information out there on them as well.

Reply by Ahmad April 3, 20102010-04-03
Glancing through the LPC2148 datasheets, it is clear that you must use an
external crystal to generate your clock signal.

Yes, the PLL uses this crystal-generated frequency to derive the CCLK at
your chosen frequency. And yes, the peripheral clock is derived from the
CCLK.

So it is clear that a crystal IS needed to generate your clock, and also
clear that this processor does not have an internal clock source. But there
are others in the NXP stable that do have an internal RC oscillator, such as
the NXP2365 family, or the NXP1765 family (Cortex). After my first board
which had a crystal footprint "just in case", I have not bothered with it in
subsequent designs, and rely exclusively on the somewhat inaccurate IRC
oscillator. Works fine for me!

Having used the above two processors, I was surprised to see from your mail
that the 2148 was constrained to using a crystal! Nice to have learnt
something new.

Regards,

Ahmad

On Thu, Apr 1, 2010 at 7:15 PM, Claudionor santos
wrote:

> Hello group,
> it is my first participation here and i am a beginner in programming MCUs
> LPC2000 family.
> I would like to know if MCU LPC2000 have a independent internal clock
> source like the MSP430 , PIC16F and others.
>
> I am using MCU NXP LPC2148 , i understand that the clock source for the CPU
> can be:
> 1) external clock / oscillator;
> 2) PLL output /CCLK ( derived from external oscillator);
> 3) Peripheral clock / PCLK(derived from CCLK);
>
> All the clock source needs external oscillator , is a correct setence?
>
> best regards,
>
> --
> Eng. Eletrônico Claudionor Santos
> DCSH - Divisăo de Concepçăo de Sistemas de Hardware
> CTI- Centro de Tecnologia da Informaçăo Renato Archer www.cti.gov.br
> (brazilian technology institute)
> Rod. SP 65 km 143,6 - Campinas - SP
> CEP: 13069-901
> Telefone: (19) 3746 6041
>
>
Reply by Claudionor santos April 1, 20102010-04-01
Hello group,
it is my first participation here and i am a beginner in programming MCUs
LPC2000 family.
I would like to know if MCU LPC2000 have a independent internal clock
source like the MSP430 , PIC16F and others.

I am using MCU NXP LPC2148 , i understand that the clock source for the CPU
can be:
1) external clock / oscillator;
2) PLL output /CCLK ( derived from external oscillator);
3) Peripheral clock / PCLK(derived from CCLK);

All the clock source needs external oscillator , is a correct setence?

best regards,

--
Eng. Eletrônico Claudionor Santos
DCSH - Divisăo de Concepçăo de Sistemas de Hardware
CTI- Centro de Tecnologia da Informaçăo Renato Archer www.cti.gov.br
(brazilian technology institute)
Rod. SP 65 km 143,6 - Campinas - SP
CEP: 13069-901
Telefone: (19) 3746 6041