cancel
Showing results for 
Search instead for 
Did you mean: 

Timer for the ST7FLite09

art
Associate II
Posted on March 22, 2004 at 05:22

Timer for the ST7FLite09

3 REPLIES 3
art
Associate II
Posted on March 17, 2004 at 10:37

Hey all,

I have a problem, my timer function of the ST7FLITE09 doesn't work! My programming tools is the Cosmic Demo V2.10f Evaluation.

It works for the vumeter.c example (Maybe someone knows), but it still doesn't work for the example of the ST7 LITE0 Exercise.exe. It show's No errors, but doesnt work!

I initialized the

LTCSR with 0x30 (Watchdog disabled, enabled the timebased Interrupt, and Timebase Period for tosz*16 000 )

I tested some Bit with this result

LTCSR,TBIE --> Enabled , Correct

LTCSR, TBF --> without´any Signal! But here should be one!!!

RCCR, CR70 --> The Oscillator Control Register, also without any Signals!

Why doesn't my timer show me that a OVF has occurs?

I have the same problems with the Autoreloadtimer!!!

Can someone help? Thanks

CU lah,

Baguslah

jatin
Associate II
Posted on March 22, 2004 at 01:44

Is your internal RC clock configured correctly?

Pls first check your cpu clock at MCO pin.
art
Associate II
Posted on March 22, 2004 at 05:22

Thanks Jatin,

the problem was the RC Oscillator. I have the information from the supplier that I have to calibrate the Oscillator.

For information:

_asm(''ld A,0xFFDE'');

_asm(''ld 0x39,A'');

or in C:

//definition of pointer to memory location containing RC calibration data

const unsigned char *RCCR0 = (unsigned char *)0xFFDE; //for Vdd=5V

const unsigned char *RCCR1 = (unsigned char *)0xFFDF; //for Vdd=3.3V

RCCR = *RCCR0; //load calibrated values for RC osc

now my programm works.

Why is the Oscillator not automaticly calibrated and where can I find some information in the Datasheet?

Why does the example work?!? They didn't initialize the RC Oscillator!?

Thanks for your help,

Bagus lah