This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

STM32 readout protection via uVision and Ulink

I'm trying to enable STM32 readout protection via Keil Ulink.
I defined a ROM1 area starting from 0x1FFFF800 up to 0x1FFFF80F.
I created a new c module containing two lines only:

#include <RTL.h>
const U32 optionByte[] = {0x00FF00FF};

I put optionByte[0] = optionByte[0] into main to force linker to include it.
I added the "STM32F10x Flash Options" into "Programming Algorithm".

I enabled the "Erase Sectors" option instead "Erase Full Chip" as suggested in http://www.keil.com/support/docs/3454.htm

If I burn the device, uVision told programming was done, but the device doesn't work. Obiuvsly, I cannot check why via JTAG, because the device is read protected.
If I disable the option programming, the device works.

I'd like to know if it's possible to enable the readout protection via Ulink under uVision.

Thanks,

Lorenzo