cancel
Showing results for 
Search instead for 
Did you mean: 

Reprogramming of Option Bytes via IAP (ST72F561)

dejan_kienzle
Associate II
Posted on November 25, 2003 at 05:01

Reprogramming of Option Bytes via IAP (ST72F561)

10 REPLIES 10
dejan_kienzle
Associate II
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
simonharrison9
Associate II
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
sjo
Associate II
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
dejan_kienzle
Associate II
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>
itsmejatinus
Associate II
Posted on November 11, 2003 at 11:00

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

sjo
Associate II
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

jatin
Associate II
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?
dejan_kienzle
Associate II
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 ]

sjo
Associate II
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