Skip to main content
Visitor II
November 25, 2003
Question

Reprogramming of Option Bytes via IAP (ST72F561)

  • November 25, 2003
  • 10 replies
  • 1773 views
Posted on November 25, 2003 at 05:01

Reprogramming of Option Bytes via IAP (ST72F561)

    This topic has been closed for replies.

    10 replies

    Visitor II
    November 10, 2003
    Posted on November 10, 2003 at 12:28

    Hey Forum!

    Isn't it possible to reprogram the option bytes via IAP?! erasing and programing of Sector 2,1 works fine in IAP mode but every time i try to erase the option bytes to reprg them the controller seems to make a reset (!?!) and thereafter the only way to get the controller alive is to write valid option bytes via a ICP programer.

    Could someone help me please

    Thanks in advance,

    Dejan
    Visitor II
    November 11, 2003
    Posted on November 11, 2003 at 05:40

    Hi,

    Option bytes, like sector 0, can only be programmed using the ICC protocol, not IAP.

    regards,

    Simon
    Visitor II
    November 11, 2003
    Posted on November 11, 2003 at 06:01

    On HDFlash devices the option bytes can be programmed in user mode (IAP) but with some issues. Have a look at the Flash Programming Referance manual for more info.

    Regards

    sjo
    Visitor II
    November 11, 2003
    Posted on November 11, 2003 at 06:40

    @sjo:

    I've read the spec and found following terms:

    1.

    A new option byte configuration becomes valid only after next device RESET. Nevertheless, the command returns n</div>
    Visitor II
    November 11, 2003
    Posted on November 11, 2003 at 11:00

    There is an FAQ in the knowledge base related to this(Reference no 58400).

    Visitor II
    November 11, 2003
    Posted on November 11, 2003 at 11:46

    I think the issue is when you erase the options they default to 0xFF and so without a valid external clock source the micro would stop running.

    Is the watchdog active on the micro (software or hardware), causing the reset.

    Regards

    sjo

    Visitor II
    November 12, 2003
    Posted on November 12, 2003 at 02:52

    Could you explain-

    - Is the reset coming between erasing and programming the option bytes OR after reprogramming the option bytes?

    - What are option byte settings you make when reprogramming?
    Visitor II
    November 12, 2003
    Posted on November 12, 2003 at 04:12

    Hey,

    the Reset comes right afer erasing the optionbyte. But in the prg spec is written that the uC takes over the new configuration NOT until the next reset!

    Anyway it looks like the uC does a reset after erasing the optionbyte

    By the way, if I do a write with the same value thats already prg (without a erase!), I get the prg success message!

    Settings are: Resonator-Osz., Speed 4-8Mhz, Hardware Watchdog ON

    any suggestions?

    regards,

    dejanki

    [ This message was edited by: DejanKi on 12-11-2003 08:46 ]

    Visitor II
    November 12, 2003
    Posted on November 12, 2003 at 06:06

    Have you tried without Hardware watchdog active.

    I do know that some devices ,eg. 651 will not reprogram (due to device reset) if the Hardware watchdog has been set.

    Regards

    sjo
    Visitor II
    November 25, 2003
    Posted on November 25, 2003 at 05:01

    Hi all,

    at last i found out that it depents on the programming voltage !?

    if it is under 12,5 V the reprg. of the option bytes fails!

    Any experiences from youre sides ?

    regards,

    Dejan