Ross Myers

HC08 locking from prying eyes...

Discussion created by Ross Myers on Nov 20, 2007
Latest reply on Nov 20, 2007 by Ross Myers
Hi All,
 
Just wondering on the locking system employed in the HC08. Is it that by default the device is locked simply because the values at FFF6+ define the lock codes and therefore will probably be different for every application depending on the address's in those locations?
 
If that is true, it would be possible to define your own lock code by doing something like below ? -
 
 org $F000
IntError1:
        jmp   Init   ; Init could be anything....
 org $F010
IntError2:
        jmp   Init
 org $FF10
IntError3:
        jmp   Init
 org $FF20
IntError4:
        jmp   Init
;=======================================
; Interrupt Vectors
;---------------------------------------
 org $FFF6
        fdb   IntError1                 ; $FFF6 = TIM1 Channel 0
        fdb   IntError2                 ; $FFF8 = PLL
        fdb   IntError3                 ; $FFFA = IRQ
        fdb   IntError4                 ; $FFFC = SWI
 
So in this situation the lock code for that program would be
F000F010FF10FF20
 
Thanks,
Ross

Outcomes