cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Code Generated by CubeMX (5.6.1) for STM32F103C8 microcontrollers ...

TPapa.1
Associate II

When I run code generated by CubeMX (version 5.6.1) using Atollic IDE or VisualGDB w/ VisualStudio and STlink as Segger or as STlink after first run that don't works well (Read Errors) I can't connect anymore the microcontrollers for debug (virually they are destroyed for debug) . If I write the code manually and in my old projects it never happens. Is it some declaration on some header? Can anyone help me?

1 ACCEPTED SOLUTION

Accepted Solutions
Forget this problem.
The problem was resolved using the Reset Pin Connected during programming.
Previously I used to program the ST’s with Reset disconnected.
Ok, the code generated with STM32CubeMX apparently need the Reset connected.
I don’t know why this difference or not exist difference because the other processors was programmed using the Stlink on Nucleo Boards (and reset was connected).
Previously with code generated manually I never connected the reset pin to the programmer and I had not problems.
My problem was resolved.
Thanks for your interest.
T.Papageorgiou
Sent from Mail for Windows 10

View solution in original post

2 REPLIES 2
Houssem CHAABANI
Senior II

Dear @TPapa.1​ 

Could please use the last version of STM32CubeMX, and can you share you .ioc file ?

Best regards,

Houssem

Forget this problem.
The problem was resolved using the Reset Pin Connected during programming.
Previously I used to program the ST’s with Reset disconnected.
Ok, the code generated with STM32CubeMX apparently need the Reset connected.
I don’t know why this difference or not exist difference because the other processors was programmed using the Stlink on Nucleo Boards (and reset was connected).
Previously with code generated manually I never connected the reset pin to the programmer and I had not problems.
My problem was resolved.
Thanks for your interest.
T.Papageorgiou
Sent from Mail for Windows 10