Hello,
I developed a firmware with bootloader for the MC9S08DV32 microcontroller.
I'm now trying to secure the device so that the flash cannot be read after the device is shipped.
When I try to secure the device by defining a variable like...
"const unsigned char NVOPT_INIT @0xFFBF = 0x7C"
...the device is secured, but the firmware does not work anymore as expected (normally there should be CAN messages sent every 20 ms, but there is no activity on the bus at all).
When i change the line back to...
"const unsigned char NVOPT_INIT @0xFFBF = 0x02"
...everything works again as expected. I have no idea why only writing one byte to NVOPT changes the behavior in such a way. Because the Debug-Mode is disenabled when the device is secure, i have no way to debug this problem.
Can you help me?
I use the classic CodeWarrior IDE, lastest version, and a P&E micro USB Multilink Interface to program the chip.
Thank you very much,
Friedemann
解決済! 解決策の投稿を見る。
Your first value ($7C) disables vector redirection, the second ($02) enables it.
That is a significant difference if the code is meant to work with or without redirection.
Your first value ($7C) disables vector redirection, the second ($02) enables it.
That is a significant difference if the code is meant to work with or without redirection.
You are right, thank you very much! I missed the FNORED bit.
I'm now securing with value 0x3C and unsecure with 0x3E.
Problem solved.