Getting flashing LED to work on olimex stm32F103-STK

I’ve been trying to get a flashing LED to work on this board without success. Inside main I have

// Configure PC.12 as output push-pull (LED)

GPIO_WriteBit(GPIOC,GPIO_Pin_12,Bit_SET);

GPIO_InitStructure.GPIO_Pin = GPIO_Pin_12;

GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;

GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;

GPIO_Init(GPIOC, &GPIO_InitStructure);

and enclosed in the while loop

GPIOC->BRR = 0x00001000;

myDelay(5000000);

GPIOC->BSRR = 0x00001000;

myDelay(5000000);

Also tried using

WriteBit inside the while loop that that didn’t work either.

What am I missing

Thanks

It seems that the problem is that the program is getting stuck in the Clk_Init routine

// 1. Cloking the controller from internal HSI RC (8 MHz)

RCC_HSICmd(ENABLE);

// wait until the HSI is ready

while(RCC_GetFlagStatus(RCC_FLAG_HSIRDY) == RESET); <==

RCC_SYSCLKConfig(RCC_SYSCLKSource_HSI);

// 2. Enable ext. high frequency OSC

RCC_HSEConfig(RCC_HSE_ON);

// wait until the HSE is ready

while(RCC_GetFlagStatus(RCC_FLAG_HSERDY) == RESET);

// 3. Init PLL

RCC_PLLConfig(RCC_PLLSource_HSE_Div1,RCC_PLLMul_9); // 72MHz

// RCC_PLLConfig(RCC_PLLSource_HSE_Div2,RCC_PLLMul_9); // 72MHz

RCC_PLLCmd(ENABLE);

// wait until the PLL is ready

while(RCC_GetFlagStatus(RCC_FLAG_PLLRDY) == RESET);

// 4. Set system clock divders

RCC_USBCLKConfig(RCC_USBCLKSource_PLLCLK_1Div5);

RCC_ADCCLKConfig(RCC_PCLK2_Div8);

RCC_PCLK2Config(RCC_HCLK_Div1);

RCC_PCLK1Config(RCC_HCLK_Div2);

RCC_HCLKConfig(RCC_SYSCLK_Div1);

/* Flash 1 wait state */

*(vu32 *)0x40022000 = 0x01;

// 5. Clock system from PLL

RCC_SYSCLKConfig(RCC_SYSCLKSource_PLLCLK);

What am I missing?

Thanks

Michael

Ps I’m using crossworks