Skip to main content
Visitor II
March 31, 2004
Question

ST7Flite25 option byte settings

  • March 31, 2004
  • 4 replies
  • 837 views
Posted on March 31, 2004 at 12:25

ST7Flite25 option byte settings

    This topic has been closed for replies.

    4 replies

    tomas2Author
    Visitor II
    March 25, 2004
    Posted on March 25, 2004 at 09:31

    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

    Tomas

    Visitor II
    March 26, 2004
    Posted on March 26, 2004 at 05:08

    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 ]
    Visitor II
    March 26, 2004
    Posted on March 26, 2004 at 11:11

    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)

    tomas2Author
    Visitor II
    March 31, 2004
    Posted on March 31, 2004 at 12:25

    Many thanks Steve and Jatin !

    Best regards,

    Tomas