EmbeddedRelated.com
Forums

LPM3 Mode at different DCO frequencies

Started by Rahul Bajaj March 5, 2008
Hello,

I am using MSP430F169

MCLKSource(DCO); //use DCO as MCLK Source
setTimerA0(ACLK_SOURCE); //Source Timer A from ACLK
_EINT(); //Enable
interrupts
__bis_SR_register(LPM3_bits); //Sleep Mode3

Whenever a timer interrupt comes, MSP wakes up but this waking up time
depends on frequency of DCO which was set earlier.

Following were my results
MHz s
4,14 0,6
2,11 0,75
1,04 0,95
0,52 1,4
0,044 14,25

According to specs it should be 6 s. Can someone please tell me why
I don't have a constant Wake up time at different frequencies?

Thanks and regards,
Rahul





Beginning Microcontrollers with the MSP430

Dear Rahul,

This is excellent data you have collected.

Can you please check what is the wake up time at about 8MHz?

Thanks and regards,

Ajesh



From: m... [mailto:m...] On Behalf Of
Rahul Bajaj
Sent: Wednesday, March 05, 2008 3:09 PM
To: m...
Subject: [msp430] LPM3 Mode at different DCO frequencies


Hello,

I am using MSP430F169

MCLKSource(DCO); //use DCO as MCLK Source
setTimerA0(ACLK_SOURCE); //Source Timer A from ACLK
_EINT(); //Enable
interrupts
__bis_SR_register(LPM3_bits); //Sleep Mode3

Whenever a timer interrupt comes, MSP wakes up but this waking up time
depends on frequency of DCO which was set earlier.

Following were my results
MHz s
4,14 0,6
2,11 0,75
1,04 0,95
0,52 1,4
0,044 14,25

According to specs it should be 6 s. Can someone please tell me why
I don't have a constant Wake up time at different frequencies?

Thanks and regards,
Rahul









Hi,

Sorry Ajesh, I am afraid that I can't as I am using internal resistors and maximum frequency that I can reach is 4,14 MHz or so.

And above all, I dont know why wake up time is varying with DCO frequency. Any idea?

Mit freundlichem Gru/ Best regards

Rahul Bajaj
R&D Engineer

Siemens AG
Automation and Drives, IA SC FS RD 4
Tel. : +49 (9621) 80-4704
Fax : +49 (9621) 80-4467
mailto:r...@siemens.com
https://www.automation.siemens.com/simatic-sensors

Siemens Aktiengesellschaft: Chairman of the Supervisory Board: Gerhard Cromme
Managing Board: Peter Loescher, Chairman, President and Chief Executive Officer;
Wolfgang Dehen, Heinrich Hiesinger, Joe Kaeser, Erich R. Reinhardt, Hermann Requardt,
Siegfried Russwurm, Peter Y. Solmssen
Registered offices: Berlin and Munich;
Commercial registries: Berlin Charlottenburg, HRB 12300, Munich, HRB 6684
WEEE-Reg.-No. DE 23691322



________________________________

From: m... [mailto:m...] On Behalf Of Ajesh GUPTA
Sent: Mittwoch, 5. Mz 2008 12:42
To: m...
Subject: RE: [msp430] LPM3 Mode at different DCO frequencies

Dear Rahul,

This is excellent data you have collected.

Can you please check what is the wake up time at about 8MHz?

Thanks and regards,

Ajesh

From: m... [mailto:msp4... ] On Behalf Of
Rahul Bajaj
Sent: Wednesday, March 05, 2008 3:09 PM
To: m...
Subject: [msp430] LPM3 Mode at different DCO frequencies

Hello,

I am using MSP430F169

MCLKSource(DCO); //use DCO as MCLK Source
setTimerA0(ACLK_SOURCE); //Source Timer A from ACLK
_EINT(); //Enable
interrupts
__bis_SR_register(LPM3_bits); //Sleep Mode3

Whenever a timer interrupt comes, MSP wakes up but this waking up time
depends on frequency of DCO which was set earlier.

Following were my results
MHz s
4,14 0,6
2,11 0,75
1,04 0,95
0,52 1,4
0,044 14,25

According to specs it should be 6 s. Can someone please tell me why
I don't have a constant Wake up time at different frequencies?

Thanks and regards,
Rahul










No, I came to know only from you.



From: m... [mailto:m...] On Behalf Of
Bajaj, Rahul
Sent: Wednesday, March 05, 2008 6:31 PM
To: m...
Subject: RE: [msp430] LPM3 Mode at different DCO frequencies



Hi,

Sorry Ajesh, I am afraid that I can't as I am using internal resistors and
maximum frequency that I can reach is 4,14 MHz or so.

And above all, I dont know why wake up time is varying with DCO frequency.
Any idea?

Mit freundlichem Gru/ Best regards

Rahul Bajaj
R&D Engineer

Siemens AG
Automation and Drives, IA SC FS RD 4
Tel. : +49 (9621) 80-4704
Fax : +49 (9621) 80-4467
mailto:r...@siemens.com

https://www.automation.siemens.com/simatic-sensors

Siemens Aktiengesellschaft: Chairman of the Supervisory Board: Gerhard
Cromme
Managing Board: Peter Loescher, Chairman, President and Chief Executive
Officer;
Wolfgang Dehen, Heinrich Hiesinger, Joe Kaeser, Erich R. Reinhardt, Hermann
Requardt,
Siegfried Russwurm, Peter Y. Solmssen
Registered offices: Berlin and Munich;
Commercial registries: Berlin Charlottenburg, HRB 12300, Munich, HRB 6684
WEEE-Reg.-No. DE 23691322

________________________________

From: m...
[mailto:m... ] On Behalf
Of Ajesh GUPTA
Sent: Mittwoch, 5. Mz 2008 12:42
To: m...
Subject: RE: [msp430] LPM3 Mode at different DCO frequencies

Dear Rahul,

This is excellent data you have collected.

Can you please check what is the wake up time at about 8MHz?

Thanks and regards,

Ajesh

From: m...
[mailto:m...
] On
Behalf Of
Rahul Bajaj
Sent: Wednesday, March 05, 2008 3:09 PM
To: m...

Subject: [msp430] LPM3 Mode at different DCO frequencies

Hello,

I am using MSP430F169

MCLKSource(DCO); //use DCO as MCLK Source
setTimerA0(ACLK_SOURCE); //Source Timer A from ACLK
_EINT(); //Enable
interrupts
__bis_SR_register(LPM3_bits); //Sleep Mode3

Whenever a timer interrupt comes, MSP wakes up but this waking up time
depends on frequency of DCO which was set earlier.

Following were my results
MHz s
4,14 0,6
2,11 0,75
1,04 0,95
0,52 1,4
0,044 14,25

According to specs it should be 6 s. Can someone please tell me why
I don't have a constant Wake up time at different frequencies?

Thanks and regards,
Rahul













How are you measuring the wake-up time? I think your problem 'may' lay
in the measuring procedure.
Please post more details of your setup and program. The details you
provided don't seem very informative to me.

--- In m..., "Bajaj, Rahul" wrote:
>
> Hi,
>
> Sorry Ajesh, I am afraid that I can't as I am using internal
resistors and maximum frequency that I can reach is 4,14 MHz or so.
>
> And above all, I dont know why wake up time is varying with DCO
frequency. Any idea?
>
> Mit freundlichem Gru/ Best regards
>
> Rahul Bajaj
> R&D Engineer
>
> Siemens AG
> Automation and Drives, IA SC FS RD 4
> Tel. : +49 (9621) 80-4704
> Fax : +49 (9621) 80-4467
> mailto:rahul.bajaj@...
>
https://www.automation.siemens.com/simatic-sensors
>
> Siemens Aktiengesellschaft: Chairman of the Supervisory Board:
Gerhard Cromme
> Managing Board: Peter Loescher, Chairman, President and Chief
Executive Officer;
> Wolfgang Dehen, Heinrich Hiesinger, Joe Kaeser, Erich R. Reinhardt,
Hermann Requardt,
> Siegfried Russwurm, Peter Y. Solmssen
> Registered offices: Berlin and Munich;
> Commercial registries: Berlin Charlottenburg, HRB 12300, Munich, HRB
6684
> WEEE-Reg.-No. DE 23691322
>
>
>
>
>
> ________________________________
>
> From: m... [mailto:m...] On
Behalf Of Ajesh GUPTA
> Sent: Mittwoch, 5. Mz 2008 12:42
> To: m...
> Subject: RE: [msp430] LPM3 Mode at different DCO frequencies
>
>
>
> Dear Rahul,
>
> This is excellent data you have collected.
>
> Can you please check what is the wake up time at about 8MHz?
>
> Thanks and regards,
>
> Ajesh
>
> From: m...
[mailto:m... ] On
Behalf Of
> Rahul Bajaj
> Sent: Wednesday, March 05, 2008 3:09 PM
> To: m...
> Subject: [msp430] LPM3 Mode at different DCO frequencies
>
> Hello,
>
> I am using MSP430F169
>
> MCLKSource(DCO); //use DCO as MCLK Source
> setTimerA0(ACLK_SOURCE); //Source Timer A from ACLK
> _EINT(); //Enable
> interrupts
> __bis_SR_register(LPM3_bits); //Sleep Mode3
>
> Whenever a timer interrupt comes, MSP wakes up but this waking up time
> depends on frequency of DCO which was set earlier.
>
> Following were my results
> MHz s
> 4,14 0,6
> 2,11 0,75
> 1,04 0,95
> 0,52 1,4
> 0,044 14,25
>
> According to specs it should be 6 s. Can someone please tell me why
> I don't have a constant Wake up time at different frequencies?
>
> Thanks and regards,
> Rahul
>
>
>
>
>
>
>
>
>
>
>
>



Thanks for replying. I am using Logic analyzer and I simply notes the difference between Timer Interrupt and MCLK start.

void testLPM3(void)
{
DCOMax(); //set DCO to 4 MHz
setTimerA0(ACLK_SOURCE); //Source Timer A from ACLK, int in every 320 s
_EINT(); //Enable interrupts
__bis_SR_register(LPM3_bits); //Enter in LPM3

}

void DCOMax(void)
{
BCSCTL1 = 0x87;
DCOCTL = 0xe0;
BCSCTL2 = 0x00;
}

#pragma vector=TIMERA0_VECTOR
__interrupt void Timer_A0( void )
{
}

I can see in pobe when my timer goes high and when MCLK starts. (all ports are already intialised correctly by the way)

Mit freundlichem Gru/ Best regards
Rahul Bajaj


________________________________

From: m... [mailto:m...] On Behalf Of tintronic
Sent: Mittwoch, 5. Mz 2008 16:06
To: m...
Subject: [msp430] Re: LPM3 Mode at different DCO frequencies

How are you measuring the wake-up time? I think your problem 'may' lay
in the measuring procedure.
Please post more details of your setup and program. The details you
provided don't seem very informative to me.

--- In m... , "Bajaj, Rahul" wrote:
>
> Hi,
>
> Sorry Ajesh, I am afraid that I can't as I am using internal
resistors and maximum frequency that I can reach is 4,14 MHz or so.
>
> And above all, I dont know why wake up time is varying with DCO
frequency. Any idea?
>
> Mit freundlichem Gru/ Best regards
>
> Rahul Bajaj
> R&D Engineer
>
> Siemens AG
> Automation and Drives, IA SC FS RD 4
> Tel. : +49 (9621) 80-4704
> Fax : +49 (9621) 80-4467
> mailto:rahul.bajaj@...
> >
https://www.automation.siemens.com/simatic-sensors
>
> Siemens Aktiengesellschaft: Chairman of the Supervisory Board:
Gerhard Cromme
> Managing Board: Peter Loescher, Chairman, President and Chief
Executive Officer;
> Wolfgang Dehen, Heinrich Hiesinger, Joe Kaeser, Erich R. Reinhardt,
Hermann Requardt,
> Siegfried Russwurm, Peter Y. Solmssen
> Registered offices: Berlin and Munich;
> Commercial registries: Berlin Charlottenburg, HRB 12300, Munich, HRB
6684
> WEEE-Reg.-No. DE 23691322
>
>
>
>
>
> ________________________________
>
> From: m... [mailto:ms... ] On
Behalf Of Ajesh GUPTA
> Sent: Mittwoch, 5. Mz 2008 12:42
> To: m...
> Subject: RE: [msp430] LPM3 Mode at different DCO frequencies
>
>
>
> Dear Rahul,
>
> This is excellent data you have collected.
>
> Can you please check what is the wake up time at about 8MHz?
>
> Thanks and regards,
>
> Ajesh
>
> From: m...
[mailto:m... ] On
Behalf Of
> Rahul Bajaj
> Sent: Wednesday, March 05, 2008 3:09 PM
> To: m...
> Subject: [msp430] LPM3 Mode at different DCO frequencies
>
> Hello,
>
> I am using MSP430F169
>
> MCLKSource(DCO); //use DCO as MCLK Source
> setTimerA0(ACLK_SOURCE); //Source Timer A from ACLK
> _EINT(); //Enable
> interrupts
> __bis_SR_register(LPM3_bits); //Sleep Mode3
>
> Whenever a timer interrupt comes, MSP wakes up but this waking up time
> depends on frequency of DCO which was set earlier.
>
> Following were my results
> MHz s
> 4,14 0,6
> 2,11 0,75
> 1,04 0,95
> 0,52 1,4
> 0,044 14,25
>
> According to specs it should be 6 s. Can someone please tell me why
> I don't have a constant Wake up time at different frequencies?
>
> Thanks and regards,
> Rahul
>
>
>
>
>
>
>
>
>
>
>
>





Again, you're providing too little detail. How are you connecting the
probe to TimerA0 interrupt? and to MCLK? What's the configuration of
TimerA? and ACLK? What about the watchdog? Even if it some
configurations may seem obvious, you should still provide them.

Michael K.

--- In m..., "Bajaj, Rahul" wrote:
>
> Thanks for replying. I am using Logic analyzer and I simply notes
the difference between Timer Interrupt and MCLK start.
>
> void testLPM3(void)
> {
> DCOMax(); //set DCO to 4 MHz
> setTimerA0(ACLK_SOURCE); //Source Timer A from ACLK,
int in every 320 s
> _EINT(); //Enable interrupts
> __bis_SR_register(LPM3_bits); //Enter in LPM3
>
> }
>
> void DCOMax(void)
> {
> BCSCTL1 = 0x87;
> DCOCTL = 0xe0;
> BCSCTL2 = 0x00;
> }
>
> #pragma vector=TIMERA0_VECTOR
> __interrupt void Timer_A0( void )
> {
> }
>
> I can see in pobe when my timer goes high and when MCLK starts. (all
ports are already intialised correctly by the way)
>
> Mit freundlichem Gru/ Best regards
> Rahul Bajaj
>
>
>
>
> ________________________________
>
> From: m... [mailto:m...] On
Behalf Of tintronic
> Sent: Mittwoch, 5. Mz 2008 16:06
> To: m...
> Subject: [msp430] Re: LPM3 Mode at different DCO frequencies
>
>
>
> How are you measuring the wake-up time? I think your problem 'may' lay
> in the measuring procedure.
> Please post more details of your setup and program. The details you
> provided don't seem very informative to me.
>
> --- In m... ,
"Bajaj, Rahul" wrote:
> >
> > Hi,
> >
> > Sorry Ajesh, I am afraid that I can't as I am using internal
> resistors and maximum frequency that I can reach is 4,14 MHz or so.
> >
> > And above all, I dont know why wake up time is varying with DCO
> frequency. Any idea?
> >
> > Mit freundlichem Gru/ Best regards
> >
> > Rahul Bajaj
> > R&D Engineer
> >
> > Siemens AG
> > Automation and Drives, IA SC FS RD 4
> > Tel. : +49 (9621) 80-4704
> > Fax : +49 (9621) 80-4467
> > mailto:rahul.bajaj@
> >
>
> https://www.automation.siemens.com/simatic-sensors

> >
> > Siemens Aktiengesellschaft: Chairman of the Supervisory Board:
> Gerhard Cromme
> > Managing Board: Peter Loescher, Chairman, President and Chief
> Executive Officer;
> > Wolfgang Dehen, Heinrich Hiesinger, Joe Kaeser, Erich R. Reinhardt,
> Hermann Requardt,
> > Siegfried Russwurm, Peter Y. Solmssen
> > Registered offices: Berlin and Munich;
> > Commercial registries: Berlin Charlottenburg, HRB 12300, Munich, HRB
> 6684
> > WEEE-Reg.-No. DE 23691322
> >
> >
> >
> >
> >
> > ________________________________
> >
> > From: m...
[mailto:m... ] On
> Behalf Of Ajesh GUPTA
> > Sent: Mittwoch, 5. Mz 2008 12:42
> > To: m...
> > Subject: RE: [msp430] LPM3 Mode at different DCO frequencies
> >
> >
> >
> > Dear Rahul,
> >
> > This is excellent data you have collected.
> >
> > Can you please check what is the wake up time at about 8MHz?
> >
> > Thanks and regards,
> >
> > Ajesh
> >
> > From: m...

> [mailto:m...
] On
> Behalf Of
> > Rahul Bajaj
> > Sent: Wednesday, March 05, 2008 3:09 PM
> > To: m...

> > Subject: [msp430] LPM3 Mode at different DCO frequencies
> >
> > Hello,
> >
> > I am using MSP430F169
> >
> > MCLKSource(DCO); //use DCO as MCLK Source
> > setTimerA0(ACLK_SOURCE); //Source Timer A from ACLK
> > _EINT(); //Enable
> > interrupts
> > __bis_SR_register(LPM3_bits); //Sleep Mode3
> >
> > Whenever a timer interrupt comes, MSP wakes up but this waking up time
> > depends on frequency of DCO which was set earlier.
> >
> > Following were my results
> > MHz s
> > 4,14 0,6
> > 2,11 0,75
> > 1,04 0,95
> > 0,52 1,4
> > 0,044 14,25
> >
> > According to specs it should be 6 s. Can someone please tell me why
> > I don't have a constant Wake up time at different frequencies?
> >
> > Thanks and regards,
> > Rahul
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>



Ok -- the measurement setup is somewhat wrong.
To measure DCO startup time, connect a signal generator to a pin of the
MSP430. Configure this pin to trigger an interrupt when it goes from say
high to low. Hook this also to the trigger input of your osci or
whatever. Measure again.

The trick is: you need an external wakeup source, the MSP430 can wake up
on interrupt. An internal source like ACLK skews the result: you do not
know when it should have fired. Quite different from a pin triggered
wake up.

tintronic:
> Again, you're providing too little detail. How are you connecting the
> probe to TimerA0 interrupt? and to MCLK? What's the configuration of
> TimerA? and ACLK? What about the watchdog? Even if it some
> configurations may seem obvious, you should still provide them.
>
> Michael K.
>
> --- In m..., "Bajaj, Rahul" wrote:
>> Thanks for replying. I am using Logic analyzer and I simply notes
> the difference between Timer Interrupt and MCLK start.
>>
>> void testLPM3(void)
>> {
>> DCOMax(); //set DCO to 4 MHz
>> setTimerA0(ACLK_SOURCE); //Source Timer A from ACLK,
> int in every 320 s
>> _EINT(); //Enable interrupts
>> __bis_SR_register(LPM3_bits); //Enter in LPM3
>>
>> }
>>
>> void DCOMax(void)
>> {
>> BCSCTL1 = 0x87;
>> DCOCTL = 0xe0;
>> BCSCTL2 = 0x00;
>> }
>>
>> #pragma vector=TIMERA0_VECTOR
>> __interrupt void Timer_A0( void )
>> {
>> }
>>
>> I can see in pobe when my timer goes high and when MCLK starts. (all
> ports are already intialised correctly by the way)
>> Mit freundlichem Gru/ Best regards
>> Rahul Bajaj
>>
>>
>> ________________________________
>>
>> From: m... [mailto:m...] On
> Behalf Of tintronic
>> Sent: Mittwoch, 5. Mz 2008 16:06
>> To: m...
>> Subject: [msp430] Re: LPM3 Mode at different DCO frequencies
>>
>> How are you measuring the wake-up time? I think your problem 'may' lay
>> in the measuring procedure.
>> Please post more details of your setup and program. The details you
>> provided don't seem very informative to me.
>>
>> --- In m... ,
> "Bajaj, Rahul" wrote:
>>> Hi,
>>>
>>> Sorry Ajesh, I am afraid that I can't as I am using internal
>> resistors and maximum frequency that I can reach is 4,14 MHz or so.
>>> And above all, I dont know why wake up time is varying with DCO
>> frequency. Any idea?
>>> Mit freundlichem Gru/ Best regards
>>>
>>> Rahul Bajaj
>>> R&D Engineer
>>>
>>> Siemens AG
>>> Automation and Drives, IA SC FS RD 4
>>> Tel. : +49 (9621) 80-4704
>>> Fax : +49 (9621) 80-4467
>>> mailto:rahul.bajaj@
>>> > >
>> https://www.automation.siemens.com/simatic-sensors
>
>>> Siemens Aktiengesellschaft: Chairman of the Supervisory Board:
>> Gerhard Cromme
>>> Managing Board: Peter Loescher, Chairman, President and Chief
>> Executive Officer;
>>> Wolfgang Dehen, Heinrich Hiesinger, Joe Kaeser, Erich R. Reinhardt,
>> Hermann Requardt,
>>> Siegfried Russwurm, Peter Y. Solmssen
>>> Registered offices: Berlin and Munich;
>>> Commercial registries: Berlin Charlottenburg, HRB 12300, Munich, HRB
>> 6684
>>> WEEE-Reg.-No. DE 23691322
>>>
>>>
>>>
>>>
>>>
>>> ________________________________
>>>
>>> From: m...
> [mailto:m... ] On
>> Behalf Of Ajesh GUPTA
>>> Sent: Mittwoch, 5. Mz 2008 12:42
>>> To: m...
>>> Subject: RE: [msp430] LPM3 Mode at different DCO frequencies
>>>
>>>
>>>
>>> Dear Rahul,
>>>
>>> This is excellent data you have collected.
>>>
>>> Can you please check what is the wake up time at about 8MHz?
>>>
>>> Thanks and regards,
>>>
>>> Ajesh
>>>
>>> From: m...
>
>> [mailto:m...
> ] On
>> Behalf Of
>>> Rahul Bajaj
>>> Sent: Wednesday, March 05, 2008 3:09 PM
>>> To: m...
>
>>> Subject: [msp430] LPM3 Mode at different DCO frequencies
>>>
>>> Hello,
>>>
>>> I am using MSP430F169
>>>
>>> MCLKSource(DCO); //use DCO as MCLK Source
>>> setTimerA0(ACLK_SOURCE); //Source Timer A from ACLK
>>> _EINT(); //Enable
>>> interrupts
>>> __bis_SR_register(LPM3_bits); //Sleep Mode3
>>>
>>> Whenever a timer interrupt comes, MSP wakes up but this waking up time
>>> depends on frequency of DCO which was set earlier.
>>>
>>> Following were my results
>>> MHz s
>>> 4,14 0,6
>>> 2,11 0,75
>>> 1,04 0,95
>>> 0,52 1,4
>>> 0,044 14,25
>>>
>>> According to specs it should be 6 s. Can someone please tell me why
>>> I don't have a constant Wake up time at different frequencies?
>>>
>>> Thanks and regards,
>>> Rahul
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
So, what exactly are you connecting the logic analyzer up to? I
assume one is the MCLK being directed to the GPIO line, but how do you
know exactly when the interrupt occurs? Have configured the TIMER-A
to generate an output?

I think the crux of the problem may not be the latency time, but the
fact that what you're measuring actually requires the CPU to do a
little (even a very little) work. The CPU is driven by the MCLK,
which you varied in your experiment.

Also, out of curiosity, why do you need such precise knowledge of the
latency? There are a lot of good reasons, not the least of which is
power consumption, but I am curious about your application.

Stuart

--- In m..., "Bajaj, Rahul" wrote:
>
> Thanks for replying. I am using Logic analyzer and I simply notes
the difference between Timer Interrupt and MCLK start.
>
> void testLPM3(void)
> {
> DCOMax(); //set DCO to 4 MHz
> setTimerA0(ACLK_SOURCE); //Source Timer A from ACLK,
int in every 320 s
> _EINT(); //Enable interrupts
> __bis_SR_register(LPM3_bits); //Enter in LPM3
>
> }
>
> void DCOMax(void)
> {
> BCSCTL1 = 0x87;
> DCOCTL = 0xe0;
> BCSCTL2 = 0x00;
> }
>
> #pragma vector=TIMERA0_VECTOR
> __interrupt void Timer_A0( void )
> {
> }
>
> I can see in pobe when my timer goes high and when MCLK starts. (all
ports are already intialised correctly by the way)
>
> Mit freundlichem Gru/ Best regards
> Rahul Bajaj
>
>
>
>
> ________________________________
>
> From: m... [mailto:m...] On
Behalf Of tintronic
> Sent: Mittwoch, 5. Mz 2008 16:06
> To: m...
> Subject: [msp430] Re: LPM3 Mode at different DCO frequencies
>
>
>
> How are you measuring the wake-up time? I think your problem 'may' lay
> in the measuring procedure.
> Please post more details of your setup and program. The details you
> provided don't seem very informative to me.
>
> --- In m... ,
"Bajaj, Rahul" wrote:
> >
> > Hi,
> >
> > Sorry Ajesh, I am afraid that I can't as I am using internal
> resistors and maximum frequency that I can reach is 4,14 MHz or so.
> >
> > And above all, I dont know why wake up time is varying with DCO
> frequency. Any idea?
> >
> > Mit freundlichem Gru/ Best regards
> >
> > Rahul Bajaj
> > R&D Engineer
> >
> > Siemens AG
> > Automation and Drives, IA SC FS RD 4
> > Tel. : +49 (9621) 80-4704
> > Fax : +49 (9621) 80-4467
> > mailto:rahul.bajaj@
> >
>
> https://www.automation.siemens.com/simatic-sensors

> >
> > Siemens Aktiengesellschaft: Chairman of the Supervisory Board:
> Gerhard Cromme
> > Managing Board: Peter Loescher, Chairman, President and Chief
> Executive Officer;
> > Wolfgang Dehen, Heinrich Hiesinger, Joe Kaeser, Erich R. Reinhardt,
> Hermann Requardt,
> > Siegfried Russwurm, Peter Y. Solmssen
> > Registered offices: Berlin and Munich;
> > Commercial registries: Berlin Charlottenburg, HRB 12300, Munich, HRB
> 6684
> > WEEE-Reg.-No. DE 23691322
> >
> >
> >
> >
> >
> > ________________________________
> >
> > From: m...
[mailto:m... ] On
> Behalf Of Ajesh GUPTA
> > Sent: Mittwoch, 5. Mz 2008 12:42
> > To: m...
> > Subject: RE: [msp430] LPM3 Mode at different DCO frequencies
> >
> >
> >
> > Dear Rahul,
> >
> > This is excellent data you have collected.
> >
> > Can you please check what is the wake up time at about 8MHz?
> >
> > Thanks and regards,
> >
> > Ajesh
> >
> > From: m...

> [mailto:m...
] On
> Behalf Of
> > Rahul Bajaj
> > Sent: Wednesday, March 05, 2008 3:09 PM
> > To: m...

> > Subject: [msp430] LPM3 Mode at different DCO frequencies
> >
> > Hello,
> >
> > I am using MSP430F169
> >
> > MCLKSource(DCO); //use DCO as MCLK Source
> > setTimerA0(ACLK_SOURCE); //Source Timer A from ACLK
> > _EINT(); //Enable
> > interrupts
> > __bis_SR_register(LPM3_bits); //Sleep Mode3
> >
> > Whenever a timer interrupt comes, MSP wakes up but this waking up time
> > depends on frequency of DCO which was set earlier.
> >
> > Following were my results
> > MHz s
> > 4,14 0,6
> > 2,11 0,75
> > 1,04 0,95
> > 0,52 1,4
> > 0,044 14,25
> >
> > According to specs it should be 6 s. Can someone please tell me why
> > I don't have a constant Wake up time at different frequencies?
> >
> > Thanks and regards,
> > Rahul
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>



Thanks. you are right tintronic.

I wrote a simple program:

main( )

{

watchDog(STOP);

portInit( );

testLMP3( );

}



t_uint portInit(void)
{

P1OUT = 0x00; //P1.1 as Timer interrupt
P1SEL |= 0x02;
P1DIR = 0x02;

P5OUT = 0x00; //MCLK, ACLK and SMCLK interrupts at Port 5
P5SEL = 0x70;
P5DIR = 0x70;

}



void testLPM3(void)

{

DCOMax(); //set DCO to 4 MHz

setTimerA0(ACLK_SOURCE); //Source Timer A from ACLK, int in every 320 s

_EINT(); //Enable interrupts

__bis_SR_register(LPM3_bits); //Enter in LPM3

}



void DCOMax(void)

{

BCSCTL1 = 0x87;

DCOCTL = 0xe0;

BCSCTL2 = 0x00;

}



#pragma vector=TIMERA0_VECTOR

__interrupt void Timer_A0( void )

{

}



Now I note time difference between timer interrupt and First cycle of MCLK.

Do not know why DCO start up time depends on frequeny that was set before it went in LPM3??





Mit freundlichem Gru/ Best regards

Rahul Bajaj
________________________________

From: m... [mailto:m...] On Behalf Of Andreas Koepke
Sent: Mittwoch, 5. Mz 2008 18:49
To: m...
Subject: Re: [msp430] Re: LPM3 Mode at different DCO frequencies

Ok -- the measurement setup is somewhat wrong.
To measure DCO startup time, connect a signal generator to a pin of the
MSP430. Configure this pin to trigger an interrupt when it goes from say
high to low. Hook this also to the trigger input of your osci or
whatever. Measure again.

The trick is: you need an external wakeup source, the MSP430 can wake up
on interrupt. An internal source like ACLK skews the result: you do not
know when it should have fired. Quite different from a pin triggered
wake up.

tintronic:
> Again, you're providing too little detail. How are you connecting the
> probe to TimerA0 interrupt? and to MCLK? What's the configuration of
> TimerA? and ACLK? What about the watchdog? Even if it some
> configurations may seem obvious, you should still provide them.
>
> Michael K.
>
> --- In m... , "Bajaj, Rahul" wrote:
>> Thanks for replying. I am using Logic analyzer and I simply notes
> the difference between Timer Interrupt and MCLK start.
>>
>> void testLPM3(void)
>> {
>> DCOMax(); //set DCO to 4 MHz
>> setTimerA0(ACLK_SOURCE); //Source Timer A from ACLK,
> int in every 320 s
>> _EINT(); //Enable interrupts
>> __bis_SR_register(LPM3_bits); //Enter in LPM3
>>
>> }
>>
>> void DCOMax(void)
>> {
>> BCSCTL1 = 0x87;
>> DCOCTL = 0xe0;
>> BCSCTL2 = 0x00;
>> }
>>
>> #pragma vector=TIMERA0_VECTOR
>> __interrupt void Timer_A0( void )
>> {
>> }
>>
>> I can see in pobe when my timer goes high and when MCLK starts. (all
> ports are already intialised correctly by the way)
>> Mit freundlichem Gru/ Best regards
>> Rahul Bajaj
>>
>>
>> ________________________________
>>
>> From: m... [mailto:m... ] On
> Behalf Of tintronic
>> Sent: Mittwoch, 5. Mz 2008 16:06
>> To: m...
>> Subject: [msp430] Re: LPM3 Mode at different DCO frequencies
>>
>> How are you measuring the wake-up time? I think your problem 'may' lay
>> in the measuring procedure.
>> Please post more details of your setup and program. The details you
>> provided don't seem very informative to me.
>>
>> --- In m... ,
> "Bajaj, Rahul" wrote:
>>> Hi,
>>>
>>> Sorry Ajesh, I am afraid that I can't as I am using internal
>> resistors and maximum frequency that I can reach is 4,14 MHz or so.
>>> And above all, I dont know why wake up time is varying with DCO
>> frequency. Any idea?
>>> Mit freundlichem Gru/ Best regards
>>>
>>> Rahul Bajaj
>>> R&D Engineer
>>>
>>> Siemens AG
>>> Automation and Drives, IA SC FS RD 4
>>> Tel. : +49 (9621) 80-4704
>>> Fax : +49 (9621) 80-4467
>>> mailto:rahul.bajaj@
>>>
> > >
>> https://www.automation.siemens.com/simatic-sensors
> >
>>> Siemens Aktiengesellschaft: Chairman of the Supervisory Board:
>> Gerhard Cromme
>>> Managing Board: Peter Loescher, Chairman, President and Chief
>> Executive Officer;
>>> Wolfgang Dehen, Heinrich Hiesinger, Joe Kaeser, Erich R. Reinhardt,
>> Hermann Requardt,
>>> Siegfried Russwurm, Peter Y. Solmssen
>>> Registered offices: Berlin and Munich;
>>> Commercial registries: Berlin Charlottenburg, HRB 12300, Munich, HRB
>> 6684
>>> WEEE-Reg.-No. DE 23691322
>>>
>>>
>>>
>>>
>>>
>>> ________________________________
>>>
>>> From: m...
> [mailto:m... ] On
>> Behalf Of Ajesh GUPTA
>>> Sent: Mittwoch, 5. Mz 2008 12:42
>>> To: m...
>>> Subject: RE: [msp430] LPM3 Mode at different DCO frequencies
>>>
>>>
>>>
>>> Dear Rahul,
>>>
>>> This is excellent data you have collected.
>>>
>>> Can you please check what is the wake up time at about 8MHz?
>>>
>>> Thanks and regards,
>>>
>>> Ajesh
>>>
>>> From: m...
>
>> [mailto:m...
> ] On
>> Behalf Of
>>> Rahul Bajaj
>>> Sent: Wednesday, March 05, 2008 3:09 PM
>>> To: m...
>
>>> Subject: [msp430] LPM3 Mode at different DCO frequencies
>>>
>>> Hello,
>>>
>>> I am using MSP430F169
>>>
>>> MCLKSource(DCO); //use DCO as MCLK Source
>>> setTimerA0(ACLK_SOURCE); //Source Timer A from ACLK
>>> _EINT(); //Enable
>>> interrupts
>>> __bis_SR_register(LPM3_bits); //Sleep Mode3
>>>
>>> Whenever a timer interrupt comes, MSP wakes up but this waking up time
>>> depends on frequency of DCO which was set earlier.
>>>
>>> Following were my results
>>> MHz s
>>> 4,14 0,6
>>> 2,11 0,75
>>> 1,04 0,95
>>> 0,52 1,4
>>> 0,044 14,25
>>>
>>> According to specs it should be 6 s. Can someone please tell me why
>>> I don't have a constant Wake up time at different frequencies?
>>>
>>> Thanks and regards,
>>> Rahul
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>
>
>