2016-12-08 05:07 AM
Hello Everyone,
I need DFU application which can load the new firmware at run time.
I want to implement DFU in stm32l476G-Eval board, tried with DFU bootloader method (Connecting Boot0 to VCC) it is working fine.
Compiled the DFU standalone example application and ran it but it is not showing as a DFU device when i connected the eval board to PC.
Can any body explain or point me to the links which can explain how to implement the DFU standalone method. How the run time DFU will work? how much space it will take for the DFU code?
#stm32l4 #usb #stm32l476g-eval #stm32l4-dfu-runtime #dfu Note: this post was migrated and contained many threaded conversations, some content may be missing.2016-12-08 05:59 AM
Dear
gamini.lakshmi_lavan
,Welcome to theSTM32 forum.
I recommend that you have a look to the application note
'STM32 microcontroller system memory boot mode', find information and requirements related to the STM32L476xx device with DFU bootloader. For using DFU on STM32, I recommend you to review the following resources: - ' Getting started with DfuSe USB device firmware upgrade STMicroelectronics extension'.-
'USB DFU protocol used in the STM32 bootloader' -https://st-videos.s3.amazonaws.com/BOOTLOADER.mp4
Getting started with STM32 built-in USB DFU BootloaderHope this helps you.
Best Regards -Imen-2016-12-08 08:17 AM
Look at how large the version you built now. Look at how large the ROM is.
I've generally avoided writing a DFU stand-alone by jumping into the ROM (F2/F4) and using that instead.
2016-12-08 09:19 PM
Hi Imen,
Thanks for your reply.
I am able to load the new firmware using Bootloader DFU mode, but i need run time DFU mode.
I have to enable the DFU class and USB device code, after that what i need to add in my code to get my device as a DFU capability device.
Here when i connected it to PC it is not detecting as a USB DFU device.
2016-12-08 09:28 PM
Hi Clive,
Thanks for your reply,
Here i need Run time DFU application for my end product.
So how can i achieve this without Bootloader mode and jumping into the ROM means?
In the standalone example they said that DFU code is in Flash memory (Starting location).
Can you please explain me how the stand alone DFU works.
2016-12-08 09:31 PM
In my final product the BOOT0 pin is connected to Ground. So i can't change the Bootloader. Can you please point me, how to achieve my device as a DFU device and i have to load the new firmware using my DFU device.
2016-12-09 06:10 AM
I'm not sure I'd design with BOOT0 physically tied to ground, it tends to foreclose options in manufacturing and test, and failure analysis of returns, but no matter.
The ROM is still mapped into memory, and you can still transfer control to it. On most current STM32 parts
SYSCFG_MEMRMP
controls the mapping of the ROM into the zero space, the equivalent of the BOOTx pins. The control transfer has been discussed here before, the specific address of the L4 ROM is something I don't know off the top of my head, but if you map the ROM in the zero space first, you can then jump via the vectors at +0 and +4. A quick search should turn up several examples and threads.2016-12-11 10:38 PM
Hi Clive,
Is it possible to implement the DFU device with out using Bootloader options? means if i enable DFU class in my application, how to handle it properly run time.
If i want to use Boot loader option, How can the device knows when it wants to jump from Application area to System memory. Can you provide any example or links to understand the Run time DFU use case.
2016-12-12 12:00 AM
I'm sure it is possible, not something I'm looking to work on.
2016-12-12 01:26 AM
To get the DFU mode at run time, do i need two applications (one for DFU and one for actual application)?
In single application, how can i achieve the DFU mode?
Is any one did this before, if so can you please explain about run time DFU.