B-L475E-IOT01A USB DFU is stuck in different states.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-06-22 10:01 PM
I am using B-L475E-IOT01A (STM32L475VGTx) dev kit and this article for DFU and I am getting following issue.
Sequence of process I do is as below.
- Erase the whole flash.
- Flash the bootloader created based on above video.
- Make a DFU using DfuSe Tool and It works.
But when I want to upgrade the device again with DfuSe Tool, DFU process stuck or gives me error. Please see below screenshot.
Upgrade file is simple LED blinking application. It works when I do the DFU first time. But for upcoming DFU does not work.
Can anyone please help me out here ?
- Labels:
-
Bootloader
-
STM32L4 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-06-23 8:04 AM
Hello,
DfuSe Tool is flagged ad NRND on its homepage.
Please use STM32CubeProgrammer instead.
Is BOOT0 Pin tied to 1 ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-06-23 11:22 PM
Thanks @Mike_ST for the prompt response.
I have tried with BOOT0 Pin tied to 1 by shorting SB9.
By doing that device is able to detect in STM32CubeProgrammer as USB device.
It can flash the firmware but flashed firmware doesn't run properly. i.e. I have flashed led blinking program. LED does not blink. It stays continuously ON.
Another observation is, there are 2 drivers for USB.
By installing first, device is detected in DfuSeTool and by second it detects in STM32CubeProgrammer.
When I install first one, It stays detected in boot mode in DfuSe tool even after I press Leave DFU Mode. This change I observed after BOOT0 pin tied to 1.
In case of STM32CubeProgrammer, when BOOT0 was at 0, device was not able to detect. When I made BOOT0 as 1, device is detected as USB all the time. And upgrade process logs are as below.
Also I have observed that UART logs have stopped after BOOT0 pin tied to 1.
Can you please help me further ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-06-24 1:16 AM
The right driver to use is STM32 Bootloader.
You'll have to keep the BOOT0 pin to 0 as you're doing your own bootloader.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-06-24 3:45 AM
Thanks @Mike_ST
I have installed STM32 Bootloader. and kept BOOT0 pin as 0.
But the same result.
Firmware flashed. No uart logs. No led blinking.
One more interseting thing I noticed when I installed STM Device in DFU Mode driver to use with DfuSe Tool.
I can see 3 target here instead of 1.
Okay now so you are suggestig to use CubeProgrammer. With that any bootloader source code provided by ST which I can use with Cubeprogrammer? like right now I am using bootloader created with the help of tutorial.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-06-24 5:33 AM
Well I'm not sure what is your setup.
I have a B-L475E-IOT01A board, so if you feel like, please share your project source (Bootloader project+ LED blinking application).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-06-24 5:51 AM
Hey @Mike_ST
Please find the source code from here.
https://drive.google.com/drive/folders/17yAcTbw08RmLOnvRW0Zigvt3q3PYccdR?usp=sharing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-06-26 10:29 PM
Hey @Mike_ST
Have you got a chance to check my code ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-06-27 5:22 AM
Hello,
yes, I compiled and tried it.
But I had to disable the "printLogs" function, I don't know whether you added the "printLogs" calls in the USB stack, but it shouldn't be there, it is messing with USB operations.
printLogs should be called from your app only.
After disabling the printLogs, I used the STM32CubeProgrammer and could upload the led blink app.
Please note that when a valid application is present, the bootloader jumps to that application, you'll need to press the blue button when releasing the reset button in order to jump to the bootloader again.
Hope that helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-06-28 10:27 PM
Thanks @Mike_ST for the checking.
I have tried with printLogs diasbled and it worked as below.
- With ST-Link Connection, erased the full chip.
- Flashed the bootloader with ST-Link
- Connected STM32CubeProgrammer with USB.
- Flashed LED blink application and it worked.
But now again I have wanted to flash the new application. SO I pressed the User Button (Blue button) when releasing the Reset button. So it went into the DFU mode and can be detected with STM32CubeProgrammer. Now with that I have tried to flash the new LED blink application and it failed. Attached are the STM32 Cube Programmer logs.
