cancel
Showing results for 
Search instead for 
Did you mean: 

ST7LITE programming problems.

michaelt
Associate II
Posted on June 11, 2003 at 13:31

ST7LITE programming problems.

9 REPLIES 9
michaelt
Associate II
Posted on June 04, 2003 at 12:23

I got a problem with programing STLITE09M6.

When i am trying to program the micro onboard (with help of inDART ST7) , i am getting a message that a program was complited , but the program doesn't run.

That can to be the problem ?

When i put the micro in inDART demo board , and program it there (Tools->Program->Program Flash,Verify Flash), the program is running rigth , but output frequency of signal doen't correct (32,33,34 khz at place of 40khz).

I think , that when i programming , i delete in some way the registor , that store calibration value of internal ocsillator.

How should i program the micro in best way?

Thanks to all
itsmejatinus
Associate II
Posted on June 05, 2003 at 09:32

For clock accuracy,first Check your cpu clock by outputting it on MCO pin and compare it with the desired cpu clock. With this, you would be able to judge whether you are calliberating your internal oscillator rightly or not.

[ This message was edited by: Ranjeet on 05-06-2003 13:03 ]
shreya
Associate II
Posted on June 05, 2003 at 11:31

Hello,

Regarding your first problem, are you able to go into debug? If you are, is your application downloaded correctly (check whether the source and disassembly correspond). If you are not able to go into debug or the application is not correctly downloaded, it may be because of the clock source. It is important to know that if Option bytes are ''Disabled'', external source is used, which means that on the application board, the OSCIN should be connected to pin 9 of the ICC connector.

And about the second. I have tried declaring a constant at FFDE(address of the RCCR) and then read the same memory location using simple load. The inDART kit evidently does not load FFDE with the constant I declared. So, I think you can be sure that RCCR value has not been modified by the inDART kit while downloading the application when entering debug.

[ This message was edited by: dasg on 06-06-2003 07:25 ]
michaelt
Associate II
Posted on June 08, 2003 at 07:35

Thank you very much for the support .

I am working with the InDART from Softec and inside i got the ST7Flite09Y . The internal Frequency should be 1Mhz with PLL *4 and the divider by 100 , that gives us freq of 40Khz .

When i am replacing the device with another one (ST7Flite09,05) its looks like there is no calibration , in the program i am reading a value of FFh in 1000h address in all units except the device came with the board .

We can see that in address 1000h we got a value 71h and 93h (1000 and 1001h) but when we are using the others chips we got random value (FFh or 55h)

Pl's advice how i can calibrate and why i got this values .

Michael
itsmejatinus
Associate II
Posted on June 09, 2003 at 08:46

I suggest to try with the calliberation values of the device that gives the correct frequency. 0x71 in your case at 1000h for lite09 (Vdd = 5V).

Have you overwriten these locations (1000h and FFDEh)?
michaelt
Associate II
Posted on June 09, 2003 at 09:39

I doesn't overwrite those location.

I just reading those values , that are already at micro's memory , and send them to RCCR register.
shreya
Associate II
Posted on June 09, 2003 at 10:56

Warning : If your program is changing location FFDE-FFDF, then the ''Memory'' window will show the values according to your program and not the ones actually on the chip. To get the actual value in FFDE-FFDF load these memory into A/X/Y registers :

'' ld A,$FFDE

ld X,$FFDF ''

Please check location 1000 too in the same way.
michaelt
Associate II
Posted on June 11, 2003 at 07:51

Thank you.

I know that i can't directly read those values.

Then i read them via register A , i allways get FFh value(exept only one micro , supported with Demo Board).

I seems like those micros wasn't calibrated...
stephanie
Associate II
Posted on June 11, 2003 at 13:31

Did you try to read the calibrated value from FFDE instead of 1000?

Please, do it if not done. FFDE HAS TO CONTAIN THIS VALUE IN ANY CASE (a mix between lite09 and 05 can make that EEPROM data is not tested and that calibrated values are not stored inside).

If you overwrote the values, there is an application note available on this site (download part): AN1324 ''Calibrating the RC Oscillator of the ST7FLITE0 MCU using the Mains''.

You can also try to find the values by dichotomy.