Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upload arduino code in stm32f103c8 after #135

Open
shehabhassan opened this issue Nov 17, 2024 · 8 comments
Open

upload arduino code in stm32f103c8 after #135

shehabhassan opened this issue Nov 17, 2024 · 8 comments

Comments

@shehabhassan
Copy link

here is my device manager recognize the STM32F103C8 as Maple Serial (COM13)
image
und here my arduino IDE screenshot when i tried to upload the code it doesn't find the Device every Uploading .

image

how i can solve this issue ?
i have struggle with this issue for three days.

Notes: I followed the instruction of flashing bootloader as provided in this link here :
https://github.com/rogerclarkmelbourne/Arduino_STM32/wiki/Flashing-Bootloader-for-BluePill-Boards

thanks in advance

@fpistm
Copy link

fpistm commented Nov 17, 2024

You have to enable USB CDC and use the com port created.

@shehabhassan
Copy link
Author

shehabhassan commented Nov 18, 2024

You have to enable USB CDC and use the com port created.

Okay Like this one Here :
But still gave me the same error as i provided in the screen
image

@fpistm
Copy link

fpistm commented Nov 18, 2024

you have to flash it first, then select the new com port created.

@shehabhassan
Copy link
Author

shehabhassan commented Nov 18, 2024

you have to flash it first, then select the new com port created.
i have received the same issue after select the CDC what i am missundersting here ?

do you mean flash arduino bootloader ?

image

@shehabhassan
Copy link
Author

you have to flash it first, then select the new com port created.

could you please clarify your suggestion because i am still confused and struggled at the position ?

@fpistm
Copy link

fpistm commented Nov 18, 2024

As stated here: https://github.com/stm32duino/Arduino_Core_STM32/wiki/Upload-methods#maple-dfu-bootloader

Warning

USB CDC have to be enable else you will not be able to upload automatically as bootloader reset sequence are managed through the USB CDC communication port.

Your issue is that the board is not started in Bootloder mode and the COM port is the USART one not the CDC. So the reset sequence to start un BL mode can't be done.

To start in BL mode manualy set the BOOT0 at 1 or eraser fully the flash then flash the bootloader, as no application it will stay in BL mode (having a DFU device and no com port).
Then flash the apllication with CDC enabled.
Next flash will work using the CDC com port.

@shehabhassan
Copy link
Author

shehabhassan commented Nov 19, 2024

As stated here: https://github.com/stm32duino/Arduino_Core_STM32/wiki/Upload-methods#maple-dfu-bootloader

Warning

USB CDC have to be enable else you will not be able to upload automatically as bootloader reset sequence are managed through the USB CDC communication port.

Your issue is that the board is not started in Bootloder mode and the COM port is the USART one not the CDC. So the reset sequence to start un BL mode can't be done.

To start in BL mode manualy set the BOOT0 at 1 or eraser fully the flash then flash the bootloader, as no application it will stay in BL mode (having a DFU device and no com port). Then flash the apllication with CDC enabled. Next flash will work using the CDC com port.

image
here is my device manager

and the monitor display this message :
image

after that i followed you instruction to enable CDC and Select the right port number.
image

image

After trying to upload the code i was got this error
image

@fpistm
Copy link

fpistm commented Nov 19, 2024

Com port is only used to reset in Maple DFU mode.
As said after the first flashing of the bootloader, your board should be in this mode.
mapledfu
But it requires a dedicated driver available here:
https://github.com/rogerclarkmelbourne/Arduino_STM32/tree/master/drivers/win

More info here: https://github.com/rogerclarkmelbourne/Arduino_STM32/wiki/stm32duino-bootloader
https://github.com/rogerclarkmelbourne/Arduino_STM32/wiki/Flashing-Bootloader-for-BluePill-Boards

Here the result of a second upload where COM9 is the USB CDC port which reset the board in Maple DFU mode then flash:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants