I Using Lockbox feature on my BF547 custom board .
I wrote the Public key to the otp (same key that analog provide with blackfin development kits) .
the code is running good when I connect to the processor with jtag .
there are 2 cases in which the code crashes after invoking the SESR :
1. the reset default values XML is unmarked in the target option .(the xml is attached in the zip folder)
2 . if I load the version hex file to the flash (flash programmer) , disconnect the jtag and reset .
how did I checked it without jtag :
in both cases I I turned a led (connected to PG 9) one time right before invoking SESR and in the second time at the beginning of the secure function right after entering to secure mode . when the turn on of the led is located before the SESR it always go well .
if it located after the processor crashes no led turning ON.
I'm attaching my code to this discussion
thank in advanced