2004-03-31 02:25 AM
2004-03-25 12:31 AM
Hi all,
I am trying to set correct option bytes in ST Visual Programmer for ST7Flite25 running on a 8Mhz crystal. I am also using the PWM at PA4. OSC RANGE = High Speed Resonator(S) 8/16Hz PLLx4x8 = PLLx8 PLL OFF PLL Disabled PLL 32 OFF = PLL32 Disabled OSC = RC Oscillator OFF Correct ? Any changes if/when using a 16MHz crystal ? Thanks for advice. Regards Tomas2004-03-25 08:08 PM
Hi
Your option bytes settings look okay, but I wouldn't use the HS setting unless you're really using a ceramic resonator. The external clock CLK_IN on OSC1 is the correct source for a quartz crystal. However I'm assuming that your selection isn't working, otherwise you wouldn't be asking! Perhap you've made the same mistake as I did? The default CLK_IN source is via PB4 (see option byte 0, bits [4:6]). After a power-on-reset the MCU is looking for your 8MHz clock on PB4 and not at the OSC1 and OCS2 pins. So you need to modify the option bytes before swapping the clock source. i.e. (1) Connect your 8MHz clock to PB4. (2) Modify the option bytes, via the STVDB7. [At this point the ICC comms might fail, as the source clock is lost.] (3) Re-wire the 8MHz clock to the OSC1 and OCS2 pins. (4) Re-start the STVDB7 project /debugger. [This should swap the clock source and re-establsh the ICC comms.] Regards Steve. [ This message was edited by: Steveboy on 26-03-2004 09:45 ]2004-03-26 02:11 AM
Hello tomasf,
For your option byte settings for 8 MHz crystal i.e. ''OSC RANGE = High Speed Resonator(S) 8/16Hz PLLx4x8 = PLLx8 PLL OFF PLL Disabled PLL 32 OFF = PLL32 Disabled OSC = RC Oscillator OFF'' The setting seems to be ok except the OSC Range which should be Medium speed resonator (4 - 8MHz). For Any changes if/when using a 16MHz crystal ? Make OSC range = High Speed (8-16MHZ)2004-03-31 02:25 AM
Many thanks Steve and Jatin !
Best regards, Tomas