Hi all,
I want to use Jlink to update my board via swd port. Before flashing my program, I had to erase the board.However a sector of flash seems to be locked the following message shows that gave erase commnad and return error:
I finally found that we should set BOOTPORT 2 if we want to disable memory protection for bootloader section. more information
we can disable the last line in the bootloader code and then erase all memory section.