# STM32F303 Readout Protection Level 1 - programs do not start at all

I never protect the FLASH memory but this time it is my client requirement. I have my own bootloader and the application ready. Everything works fine if the protection level is zero. But if I switch it (it does not matter if I use ST-LINK utility or it is done from the bootloader) to the Level 1 the program just do not work. I know that is ridiciolus to say "program does not work" - but during the tests I wrote simple LED blinking program. It only enables the GPIO clock and toggles the LED. It works fine on level 0, but stops working on Level1. As I understand switching from level 0 to 1 or 2 does not erase the FLASH (it does in the opposite direction). I cant take a look inside as any debug interfaces are disabled.

Boot 0 is connected via 10k resistor to the GND.

• Perhaps you can add a link to the datasheet for your device. – Tyler Nov 11 '17 at 2:56
• as per Application note AN4701 on st.com website When the read protection level 1 is activated, no access (read, erase, and program) to Flash memory or backup SRAM can be performed via debug features same for level 2 ..... you have to program the chip first, then switch levels ... are you by chance switching level and then programming it? – jsotola Nov 11 '17 at 4:05
• it also says that you have to boot from flash – jsotola Nov 11 '17 at 4:08
• @jsotola it is obvious. If something is write protected, it has to be programmed first :) – 0___________ Nov 11 '17 at 8:30
• And protected after programming – 0___________ Nov 11 '17 at 9:10