The read protection is activated by setting the RDP option byte and then, by applying a
system reset to reload the new RDP option byte.
Note: If the read protection is set while the debugger is still connected through JTAG/SWD, apply a
POR (power-on reset) instead of a system reset (without debugger connection).
If I program the board with the debugger (ROP activated), disconnect the device and do a POR, all works fine.
The problem was that I did the POR when debugger cable connected (debugger was deactivated, I was not debugging, it was just the cable).
So we really need to disconnect jtag cable, even if the debugger is not activated.
Good to know, but it maybe is just a problem/flaw of my ULINK.
Retrieving data ...