2007-06-05 01:50 AM
2007-05-27 08:30 PM
While reading the ST7FLITEU0x datasheet, I found some confusing things.
The figure 1 at page 4 does not show the Debug Module, while Table 3 at page 10 lists the addresses of the debug modules registers. Which one is true? The same Table 3 and section 7.2 at page 24 say that the initial value of SICSR is 0000 0x00 (binary). Since SICSR(6:5) holds the RC calibration value, it means that the internal RC oscillator does not start at the lowest frequency, but a slight higher one. On the contrary, the Table 13 at page 38 shows that the reset value of SICSR(6:5) is 0110 0x00... The reset value of CKCNTCSR is confusing too. According to the datasheet, the AWU_FLAG and RC/AWU should both be 1. If I understand correctly page 22 and the following ones, it means that a ST7FLUTEU0x starts form the internal 33kHz AWU RC oscillator (if the option bytes are programmed to use the internal RC oscillator). To use the internal RC (8MHz) source, the AWU->RC changing sequence should be executed which I didn't find in the application notes. Thank you in advance for the help. EtaPhi2007-05-29 12:41 AM
... and after all you can select device options as described in
chap 15 DEVICE CONFIGURATION AND ORDERING INFORMATION on page 115: Bits 7:6 = CKSEL[1:0] Start-up clock selection.This bit is used to select the startup frequency. By
default, the Internal RC is selected.
Configuration CKSEL1 CKSEL0
Internal RC as Startup Clock 0 0
AWU RC as a Startup Clock 0 1
Reserved 1 0
External Clock on pin PA5 1 1Using the STVP7 programming software you'll find selectable alternative options CKSEL:
AWU RC as startup clock
External clock on PA5
Internal RC as startup clock and curious :o : you might select CKSEL Reserved !!! WoRo
2007-06-04 05:55 AM
Etaphi, Woro,
Thank you for your interest and your very helping feedback. We will take in account your remarks. Best regards Laurent2007-06-05 12:50 AM
The restart value of the CKCNTCSR seems to depend on what you select as CKSEL in the option byte.
With a ST7LiteUS2 I've got the following results: ___Option CKSEL --> Restart Value CKCNTCSR_____ Internal RC as Startup Clock --> 0000 0100 AWU RC as a Startup Clock --> 0000 1001 External Clock on pin PA5 --> 0000 1001 Regards WoRo2007-06-05 01:50 AM
Hi,
Concerning CKCNTCSR, the 3 first CPU cycles are run at AWU RC frequency, so this register contains 0x09, then the option bytes are read and the clock switched if needed. If an internal RC is used then CKCNTCSR = 0x04 but in all other case CKCNTCSR keep unchanged even when external clock is selected. So your values are the one expected. Best regards Laurent