Skip to main content
Graduate
February 4, 2023
Question

STM32 - bootloader commands for readout protect/unprotect not working...?

  • February 4, 2023
  • 2 replies
  • 1659 views

I am working with several STM32, let's focus on the STM32L4P5.   I wrote a windows utility which does a nice job of loading code with the bootloader, per the AN3155 documentation. It is nicely robust, and I've been using it for a couple months. I want to add the capability of selecting to protect or unprotect readout with a user selection. 

I send the 0x92+0x6D to unprotect, then write the code, and the code executes just fine, but hooking up the J-link re-erases everything, indicative of protection being set.

Has anybody used this successfully?

    This topic has been closed for replies.

    2 replies

    Graduate II
    February 5, 2023

    Try check if this work with stm32CubeProgrammer

    JCase.1Author
    Graduate
    February 5, 2023

    No. I'm not using Cube. I have a product with several embedded STM32 micros, and I need to be able to reprogram any of them via a single USB port. I need to use the bootloader, and I need custom code to do this so that I can use the micro riding on the USB UART to pass-thru as appropriate and wiggle BOOT0 and \RESET of the downstream boards as appropriate. This should work according to the documentation --- all the other functions work great and the bootloader functions. I just can't set the read unprotect.

    Graduate II
    February 6, 2023
    I understand and don’t ask this. Cube prog is for test and check unprotect on one prepared MCU. And some MCUs have exceptions and errata read AN2606