Skip to main content
GSewe
Associate
February 1, 2022
Question

DFU Mode with L152 / L082

I am developing a project for the L082 (as we have stock of these) but am currently using the L152 discovery board to get things started. This is going well but I thought that I would try the DFU mode to allow easier field software updates. I tried connecting Boot 0 to Vdd and restarting but I see no change in device manager where I was expecting to see the DFU device. Maybe I am expecting too much but I have a few questions.

  1. Do the L152 (and L082) have built in boot loaders and should this procedure work? I am using the USB interface in my application as a virtual com port and this is working fine.
  2. My main project was created in CubeMx and I have not seen any option to change the start address or to access the scatter file. Does this need to be handled manually to start the main application away from the bootloader. Or is the bootloader located in a different area of flash that is activated when Boot 0 is pulled up?
  3. I therefore may have obliterated the bootloader by main main application. If this is the case, can I download the L152 bootloader and re-install via ST-link?
  4. Are there guidelines on modifying the scatter file and the effect on other aspects such as restart/interrupt vectors?
  5. When we build our new boards with L082 devices fitted, should the DFU device appear (at least until I destroy it with my build!)?

Best regards

Graham Sewell

This topic has been closed for replies.

2 replies

TDK
February 1, 2022

> using the L152 discovery board

You need to connect to the chip through USB to access DFU mode. The onboard connector connects to the ST-Link chip, not the target MCU.

There isn't a USB connector on the board that connects directly to the chip, so you would need to solder one on in order to access the DFU bootloader, assuming you're using this board:

https://www.st.com/en/evaluation-tools/32l152cdiscovery.html

Bootloader is in ROM and can't be erased.

Details about which bootloaders are supported on each chip are in AN2606.

https://www.st.com/resource/en/application_note/cd00167594-stm32-microcontroller-system-memory-boot-mode-stmicroelectronics.pdf

"If you feel a post has answered your question, please click ""Accept as Solution""."
GSewe
GSeweAuthor
Associate
February 1, 2022

Thank you for your rapid reply! Yes, that's the board that I am using. I am connecting USB via PA11 and PA12 on the edge connectors / target MCU. The virtual COM port using this interface is working ok from my main application.