Kaj G. schrieb:
Simon G. schrieb:
Was genau bewirkt das Security-Bit?
Das steht ausführlich im Datenblatt. Brauchst nur reingucken.
Das hatte ich schon gemacht, und da steht unter anderem folgendes:
Security Bit
The security bit allows the entire chip to be locked from external access for code security. The security bit can be written by a dedicated command, Set Security Bit (SSB). Once set, the only way to clear the security bit is through a debugger Chip Erase command. After issuing the SSB command, the PROGE error bit can be checked.
In order to increase the security level it is recommended to enable the internal BODVDD when the security bit is set.
Das würde mich in meiner Annahme über die Funktion bekräftigen, aber widerspricht meiner Erfahrung, dass ich bei gesetztem Bit die User-Row im Betrieb nicht schreiben kann.
Im Kapitel NVMCTRL steht folgendes:
0x05 EAR Erase Auxiliary Row - Erases the auxiliary row addressed by the ADDR register. This command can be given only when the Security bit is not set and only to the User Configuration Row.
0x06 WAP Write Auxiliary Page - Writes the contents of the page buffer to the page addressed by the ADDR register. This command can be given only when the Security bit is not set and only to the User Configuration Row.
Dies würde die Aussage bekräftigen, dass ein schreiben der User-Row bei gesetztem Security-Bit prinzipiell nicht möglich ist.
Mein Bootloader, der aber im Grunde nichts anderes macht als das Hauptprogramm kann aber, auch bei gesetztem Bit, die User-Row beschreiben.
Beim Debugen ist mir noch aufgefallen, dass sich die Bits 16 bis 23 des ADDR Registers des NVMCTRL -Moduls nicht schreiben lassen.
Hat jemand eine Erklärung dafür?
Gruß,
Simon