Having a problem with bootloader after uploading code

Bootloader for STM32F103 and STM32F4xx micro-controllers
No special driver is required. Support for Windows, Linux and Mac Operating System
User avatar
fpiSTM
Posts: 731
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 27
Location: Le Mans
Contact:

Re: Having a problem with bootloader after uploading code

Post by fpiSTM »

For Roger'core a driver is needed because it uses a specific VID/PID. Using a referenced one will avoid to use the dedicated driver installation which in fact only a wrapper to the generic driver for this couple ID.

stevestrong
Posts: 300
Joined: Fri Dec 27, 2019 4:53 pm
Answers: 6
Location: Munich, Germany
Contact:

Re: Having a problem with bootloader after uploading code

Post by stevestrong »

fpiSTM wrote:
Sun Apr 19, 2020 7:47 am
For Roger'core a driver is needed because it uses a specific VID/PID.
That is not quite correct.
If it would be so, then it should be recognized as COM port after deleting the driver in the device manager on Windows.
But it won't work because of the specific USB device and configuration descriptors.

In my custom USB driver I use the same VID:PID as the libmaple core (1eaf:0004) and it recognizes as COM port directly (I had to delete the previous libmaple driver for this configuration).

And this is why @mauriziostm32 also has problems with the serial port, it needs a driver (even if this is only a wrapper, but is needed), otherwise it will be not recognized as COM port.

User avatar
fpiSTM
Posts: 731
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 27
Location: Le Mans
Contact:

Re: Having a problem with bootloader after uploading code

Post by fpiSTM »

If the desc is specific then yes. ;)

mauriziostm32
Posts: 18
Joined: Sat Mar 21, 2020 3:18 pm

Re: Having a problem with bootloader after uploading code

Post by mauriziostm32 »

Hi Guys

Thanks to you all...
Thanks to Stevestrong for the effort on keeping alive and updated the original Roger's... I'm looking forward for the CDC ;)

fpiSTM it seems my standard W7 installation doesn't have the driver??? very strange... I attach the picture

Tried on different port... but to be sure I will try on another PC with windows 7

Thanks
Attachments
non funzia2.png
non funzia2.png (26.3 KiB) Viewed 1522 times

mauriziostm32
Posts: 18
Joined: Sat Mar 21, 2020 3:18 pm

Re: Having a problem with bootloader after uploading code

Post by mauriziostm32 »

Hi Guys

I tried on another PC and as soon as I plugged the cable the device was recognized and the driver was self installed (or just the device was associated with the existing CDC driver) by windows 7...

I attach the picture...

So it seems that for some reason the other PC doesn't have the driver or doesn't make the association...

I'll check...

Thanks again

Maurizio
Attachments
funzia.png
funzia.png (60.57 KiB) Viewed 1521 times

stevestrong
Posts: 300
Joined: Fri Dec 27, 2019 4:53 pm
Answers: 6
Location: Munich, Germany
Contact:

Re: Having a problem with bootloader after uploading code

Post by stevestrong »

Maurizio, on the problematic PC try to uninstall the driver (check the deleting the driver box) for the unrecognized entry.
This will force the PC to newly search for an appropriate driver.

mauriziostm32
Posts: 18
Joined: Sat Mar 21, 2020 3:18 pm

Re: Having a problem with bootloader after uploading code

Post by mauriziostm32 »

Hi Steve

It seems there is no driver to uninstall... so when I install the device and re-plug, the PC says that cannot install, I try to let the PC go on internet but it says there is no driver for this device... I think this PC is a little bit messed up

I have 2 more question a little bit out of topic, if is the case I open a new post.

1) To software reset in STM32 core I can use the function NVIC_SystemReset(); but what can I use for Roger's CORE?

2) I know that 99% the answer is no... but I try... is there a way to put the stm32f103c8... in bootloader mode by code? core related ?

Thanks
Attachments
non funzia3.png
non funzia3.png (57.42 KiB) Viewed 1516 times

User avatar
fpiSTM
Posts: 731
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 27
Location: Le Mans
Contact:

Re: Having a problem with bootloader after uploading code

Post by fpiSTM »

Sounds stange as it is a generic driver for CDC class

stas2z
Posts: 131
Joined: Mon Feb 24, 2020 8:17 pm
Answers: 8

Re: Having a problem with bootloader after uploading code

Post by stas2z »

mauriziostm32 wrote:
Sun Apr 19, 2020 11:05 am
Hi Steve

It seems there is no driver to uninstall... so when I install the device and re-plug, the PC says that cannot install, I try to let the PC go on internet but it says there is no driver for this device... I think this PC is a little bit messed up

I have 2 more question a little bit out of topic, if is the case I open a new post.

1) To software reset in STM32 core I can use the function NVIC_SystemReset(); but what can I use for Roger's CORE?

2) I know that 99% the answer is no... but I try... is there a way to put the stm32f103c8... in bootloader mode by code? core related ?

Thanks
1.nvic_sys_reset()
2. yes, it's possible, buy you have to do it yourself
find system boot address here
https://www.st.com/resource/en/applicat ... ronics.pdf
first disable all irqs, clocks, reset systemtick, probably reinit clock to use HSI and jump to system bootloader address or remap system memory to 0x0 and jump there
you can check example made with HAL here
https://github.com/stm32duino/Arduino_C ... 2/pull/710
but sure you need to port it to roger's core (not so difficult imo)

stevestrong
Posts: 300
Joined: Fri Dec 27, 2019 4:53 pm
Answers: 6
Location: Munich, Germany
Contact:

Re: Having a problem with bootloader after uploading code

Post by stevestrong »

mauriziostm32 wrote:
Sun Apr 19, 2020 11:05 am
1) To software reset in STM32 core I can use the function NVIC_SystemReset(); but what can I use for Roger's CORE?
Yes as @stas2z mentioned.
Here is how it is handled by Roger's core:
https://github.com/rogerclarkmelbourne/ ... l.cpp#L313

Post Reply

Return to “STM32 HID bootloader”