I am programming for LPC microcontrollers (mostly LPC1769), for the past few months with success. I decided though to give STM32 series a try.
I just received a no-name board using an STM32F103C8 MCU like the pictured one.
I am using Eclipse to develop my firmware, where I have also installed the ST's plugin for ARM development. I program the chip through UART utilizing the factory bootloader. I have also extracted the CMSIS library from ST's Cube library, and I have included it in my project.
What I am trying to achieve: This board has an LED on PC13, and I am trying just to blink it. My project builds fine, and it uploads fine too.
The problem: Nothing at all happens at the board. I believe that the GPIO is does not even getting configured as output.
I have tried lots of different codes. Here is an example:
#include "stm32f10x.h"
int main(void)
{
SystemInit();
SystemCoreClockUpdate();
RCC->APB2ENR |= RCC_APB2ENR_IOPCEN;
GPIOC->CRH=0x33333333;
while(1)
{
volatile int i = 0;
for(i=0;i<0x40000;i++){
}
GPIOC->ODR ^= (1 << 13);
}
}