cancel
Showing results for 
Search instead for 
Did you mean: 

USB enumeration fails after downloading new firmware into CubeIDE repository

iforce2d
Associate III

I have been working on a F103 project for a few years. Recently I set up a new computer and copied my source code there to work with. I was able to build and run my project on the new computer just fine for a few months.

Today, I wanted to do a quick test (also F103) so I made a new project using the wizard. I went through the steps of choosing the target etc, and as part of that process the IDE downloaded a firmware library (the stuff that goes into the 'Repository' folder like "STM32Cube_FW_F1_V1.8.6"). My test project worked ok.

The problem is that now my main project will not enumerate as a USB device unless it is started from the IDE. I used to be able to connect the USB cable separately to power my board and it enumerated just fine, but now all the USB functionality completely fails.

What's worse is this seems to have affected the hardware itself somehow, because when I flash this same board using my old computer (where nothing about my CubeIDE setup has changed since I set up the new computer) I get the same result!! Something about the MCU itself seems to have been affected, is this even possible?

I tried removing the newly added firmware from the Repository folder, restarting the IDE, doing a full clean and rebuild of the project etc, but nothing helps.

1 REPLY 1
iforce2d
Associate III

Okay, this was my fault. I forgot that my main project starts from a bootloader in the first 16kb of flash space. When I  uploaded the test project my bootloader was overwritten. When running via the IDE it's configured to start from the main app address, not the bootloader, so it had no problem. Quite embarrassing to waste two hours on this, you can delete the thread if you like...