2018-03-11 12:10 AM
The STM32F103C8 is throwing an error it is repeating the code from main loop again and again and not entering inside While loop. I am also unable to debug it in attolic studio since it is showing an error also. I have tried various codes but nothing is working .
The error coming while debugging is..
Failed to execute MI command:
target extended-remote localhost:61234Error message from debugger back end:
Remote communication error. Target disconnected.: No error.The code is attached in zip file. It is not entering in While loop but repeatedly running main loop from begining till begin of while
#stm32f103c82018-03-11 01:15 AM
Sorry to hear that, care to share enough detail so others might be able to assist you?
2018-03-11 01:37 AM
throwing an error
What, exactly, does that mean?
it is repeating the code from main loop again and again
Is the watchdog restarting it?
I am also unable to debug it in attolic studio since it is showing an errorSo what error, exactly, is it showing?
How do you expect anyone to help you to resolve that error without even knowing what error it is?!
2018-03-11 04:14 AM
i have updated question as per your suggestions thank you
2018-03-11 08:10 AM
Chrome will strip the formatting/tabulation, Firefox won't.
You look to have a return 0 ; in main(), you don't want to do this as it is either likely to cause the system to crash, or re-enter.
2018-03-11 03:11 PM
No sir It is not a problem because of that return condition I am receiving same problem in common blink function too the code I have updated in answer which will give you proper understanding of this issue. I am sure about code since even a normal gpio toggle is not working
2018-03-11 05:34 PM
Code seems to evolve and be different.
Perhaps consider a better, more robust, debugger?
Look at the startup.s code and replace the BX LR after it calls main with an infinite loop. Not seeing anything here immediately that would cause a reset. If it does this across lots of programs, scope the supply pins, and the NRST pins and confirm there is nothing odd going on there.