cancel
Showing results for 
Search instead for 
Did you mean: 

how to enter the USB DFU mode in STM32L162VE?

VNasa.1
Associate

Currently, I am using the STM32L162VE custom board. I want to enter the USB DFU mode but am not able to enter the mode. This chip supports the USB and USART pre-programmed bootloaders. I have referred to the application notes AN2606 and AN3156. I did the below steps with reference to AN2606.0693W00000aIvUhQAK.png0693W00000aIvVBQA0.png 

For making the BOOT0 pin to 1, have connected the JP1 jumper and Boot1 making as 0 as below.0693W00000aIvVLQA0.pngIs there any DFU standalone application for STM32L162VE/ ZE?

Do we need to create any project using CUBE MX for a USB device as DFU? Can you please guide me on how to enter the DFU mode and update the firmware?

3 REPLIES 3
KDJEM.1
ST Employee

Hello @VNasa.1​ and welcome to the community 😊,

Maybe the problem here might be caused by the HSE crystal.

For that, I advise you to follow this FAQ: DFU mode with system bootloader is not working, while USB does.

Also, you can get inspired form the DFU_Standalone example available in STM32CubeL1 package.

This example may help you by following the instructions in the readme file.

Finally, I advise you to refer to AN3156, this application note describes the USB DFU protocol used in STM32 microcontroller bootloader, detailing each supported command.

I hope this help you!

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

VNasa.1
Associate

Hi Kaouthar,

I am using 8Mhz external oscillator on the board as below.

0693W00000aIzrkQAC.pngI have a few doubts as below.

USB or USART pre-programmed bootloader is stored by the ST during production.

1) Is there any code(like DFU standalone example) that needs to dump on the board to enter DFU mode?

need to create a project using cubeMx and modify the address as per the datasheet.

As per my understanding Just we need to configure the boot pins and connect the USB. Using the DfuSe tool or STcube Programmer for updating the FW. No need to create a project using CubeMx and modify the application as per the datasheet.

Is my understanding correct? Please help me with this.

KDJEM.1
ST Employee

Hello @VNasa.1​ ,

You can use the STM32Cube programmer to access the USB-DFU bootloader. This article can help you to do that.

Also, you can inspired from the available example in the STM32CubeL1 and modify the USB DFU firmware examples to work with STM32CubeProgrammer. For that you can follow the steps shared in this FAQ.

Thank you for your contribution in STCommunity.

When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.