Hello,
Not sure whether you require to initialize the block protection from within your code, or need to alter the block protection value within a debug session. I will assume that you actually require to initialize block protection.
The value within the NVPROT flash register is automatically written to the FPROT register during a reset. This means that you need to program the NVPROT setting, at the same time as your project code. The assembly code to accomplish this:
ORG NVPROT
DC.B <value>
.
For C, the following should work with the CW compiler -
const byte NVPROT_init @0xFFBD = <value>;
.
Regards,
Mac