Page 2 of 5

Re: Having a problem with bootloader after uploading code

Posted: Sun Apr 19, 2020 7:47 am
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.

Re: Having a problem with bootloader after uploading code

Posted: Sun Apr 19, 2020 8:16 am
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.

Re: Having a problem with bootloader after uploading code

Posted: Sun Apr 19, 2020 8:48 am
by fpiSTM
If the desc is specific then yes. ;)

Re: Having a problem with bootloader after uploading code

Posted: Sun Apr 19, 2020 9:05 am
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

Re: Having a problem with bootloader after uploading code

Posted: Sun Apr 19, 2020 9:23 am
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

Re: Having a problem with bootloader after uploading code

Posted: Sun Apr 19, 2020 10:04 am
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.

Re: Having a problem with bootloader after uploading code

Posted: Sun Apr 19, 2020 11:05 am
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

Re: Having a problem with bootloader after uploading code

Posted: Sun Apr 19, 2020 11:18 am
by fpiSTM
Sounds stange as it is a generic driver for CDC class

Re: Having a problem with bootloader after uploading code

Posted: Sun Apr 19, 2020 11:23 am
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)

Re: Having a problem with bootloader after uploading code

Posted: Sun Apr 19, 2020 12:59 pm
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