Skip to main content
Explorer
September 20, 2025
Question

USB DFU not work with RDP Level1

  • September 20, 2025
  • 2 replies
  • 629 views

Hello Team,

With RDP set to Zero Level , Firmware upload succesfully using CubeProgrammer GUI ( USB DFU mode ).

But If I set RDP LeveL 1 , Device not able to detect on PC device manager and not able to connect with STM32 using CubeProgrammer USB interface Option. It does not connect at all.

Hence , Firmware update not possible with RDP 1 using USB DFU.

After Setting RDP Level 1 to Zero using STlink V2 SWD interface , It works fine in USB DFU mode.

Is it the correct behaviour ? Everytime do we need to set RDP Level 0 using STlink SWD and Then use USB DFU ?

MCU is : STM32F303Rb

    This topic has been closed for replies.

    2 replies

    Super User
    September 21, 2025

    When RDP is not 0, the MCU will not boot off the "system" bootloader, this is why it isn't working. This is the correct behavior. So indeed firmware update is not possible using the "system" bootloader. Yes, SWD can be used to reset the RDP and update.

     

     

     

    bsutharAuthor
    Explorer
    September 23, 2025

    Hello Pavel,

    Thank you for this update.

    Whole Idea is to Update the Firmware from PC with USB Interface Only While Existing Firmware is Read Protected ( SWD interface Used first time to Flash & set RDP1 ).

    Physical access to Boot0Pin and Reset Pin is not available Due to legacy system design.

    So, Even if we write Custom  Bootloader for USB DFU in separate Memory Region With RDP1 ( or we Can call In-built USB DFU BootLoader ) to Re-Flash the Main Application ( which is also RDP1) when it needed , Would it be same Behaviour ?  

    Regards,

    Bhupendra

    Super User
    September 23, 2025

    A custom bootloader is for the MCU the same as user application, so in RDP1 state it can do everything that application can do. It can rewrite the internal flash.

    Technical Moderator
    September 24, 2025

    Hi @bsuthar 

    • A custom bootloader is just a user application running in flash. It is possible to program Option Bytes to change RDP level, but it requires a reset to apply changes.
    • ST provides USB DFU examples in STM32CubeF3 firmware packages. You can adapt these for a custom bootloader. Also, STM32CubeProgrammer supports USB DFU upload to custom bootloaders.
    bsutharAuthor
    Explorer
    September 25, 2025

    Thank you, FBL 

    For this Suggestion. I will Look into it.

    By the way , you Suggested to use DFU of  STM32373C_EVAL  , Would it better to use DFU of STM32303C_EVAL "OR"  STM32F3-Discovery ? Considering my Device : STM32F303rb.

    bsuthar_0-1758801197438.png

    Also , if you can Confirm these DFU example resembles to this Training Session : https://www.youtube.com/watch?v=n_LDXOQHerU

     

    Thanks.

    bsutharAuthor
    Explorer
    October 1, 2025

    Hello FBL ,

    Awaiting your suggestion Previouse queries ...

    Thank you,

    Bhupendra