I have a legacy hc11 application in an 68hc711e9 with OTP ROM which has at one point an instruction that is (raw instruction bytes $20FE) loc BRA loc ie an infinite loop. What bytes can I reprogram these two bits to function as to avoid this loop? NOP is out of the question as it is $21. I can only turn bits to zero when (re)programming an OTP device, right? -- -Torgeir |
|
reprogramming an OTP device
Started by ●June 23, 2004
Reply by ●June 23, 20042004-06-23
Have you considered $2000 - should branch to the next instruction, i.e. behave as a 2 byte NOP. On Thu, 2004-06-24 at 10:17, Torgeir Veimo wrote: > I have a legacy hc11 application in an 68hc711e9 with OTP ROM which has > at one point an instruction that is > > (raw instruction bytes $20FE) > > loc BRA loc > > ie an infinite loop. What bytes can I reprogram these two bits to > function as to avoid this loop? NOP is out of the question as it is $21. > I can only turn bits to zero when (re)programming an OTP device, right? -- Bob Mitchell PO Box 68 Phone (+61 2) 9449 4736 (21 Hudson Close) Fax (+61 2) 9449 1976 Turramurra, 2074 Mobile 0411554117 NSW, Australia Email |
|
Reply by ●June 24, 20042004-06-24
Turn the $20FE to $2000 to BRA to the next opcode, in effect making this a
NOP.
----- Original Message ----- From: "Torgeir Veimo" <> To: <> Sent: Thursday, June 24, 2004 3:17 AM Subject: [m68HC11] reprogramming an OTP device > I have a legacy hc11 application in an 68hc711e9 with OTP ROM which has > at one point an instruction that is > > (raw instruction bytes $20FE) > > loc BRA loc > > ie an infinite loop. What bytes can I reprogram these two bits to > function as to avoid this loop? NOP is out of the question as it is $21. > I can only turn bits to zero when (re)programming an OTP device, right? > > -- > -Torgeir |
Reply by ●June 24, 20042004-06-24
Robert Mitchell wrote: > Have you considered $2000 - should branch to the next instruction, i.e. > behave as a 2 byte NOP. Thanks, this was what I was looking for. Normally, only a reset or a nonmaskable interrupt can take regain control of the hc11 in these cases, right? -- -Torgeir |
Reply by ●June 24, 20042004-06-24
An infinite BRA loop is sometimes used after initialization to let some interrupt take control periodically. It doesn't have to be non-maskable. Often, the IDLE task in an RTOS is a BRA * loop. ----- Original Message ----- From: "Torgeir Veimo" <> To: <> Sent: Thursday, June 24, 2004 11:22 AM Subject: Re: [m68HC11] reprogramming an OTP device > Robert Mitchell wrote: > > > Have you considered $2000 - should branch to the next instruction, i.e. > > behave as a 2 byte NOP. > > Thanks, this was what I was looking for. > > Normally, only a reset or a nonmaskable interrupt can take regain > control of the hc11 in these cases, right? > > -- > -Torgeir |