At the moment I want to get used to programming STM32 chips, through registers. I did this also with other brands, and wanted to extent my knowledge.For this i bought a STM32F103C8T6 (Blue pill), a ST-link V2 and wanted to use the Keil software.Because it is my first time with the STM32, i wanted to start simple with turning on a LED.
The problem I am now facing is that when i tried to download the code to the flash, nothings happens on the board.Keil says that everything went successful(programming done).I've used multiple codes to test it, but none are working at the moment.The last code to let a led blink, i used is:
The following setup I am using:Now my question is, am i doing something wrong?Hope you guys can help me with this, many thanks!
Set a breakpoint and see if you get to main().
For DIY low level programming I recommend this book.
There is a companion website as well, with all the code on it.
Thank you for the information.The code is now working, the website https://nicerland.com/stm32f103/ has helped me with that.
I saw that i made two stupid mistakes, while downloading the code to flash i did not build the code.Due to other experiences i thought it would first automatic build the code after downloading it to the flash.
Second mistake i made was not pressing the reset button, after the code was send to the STM32.