AnsweredAssumed Answered

stm3210C-Eval Debug-HSEStatus

Question asked by arslan.bahadir on Oct 7, 2013
Latest reply on Oct 8, 2013 by Clive One
hello forum. I am new at arm so first I want to use the GPIO. I use stm3210c-eval. and this development board use stm32f107VC. I write code like this.
#include "stm32f10x.h"
#include "stm32_eval.h"
#include <stdio.h>


GPIO_InitTypeDef GPIO_initstructure;


void delay(void)
{
          uint8_t i,j;
                    for(j=0;j<250;j++)
                    {
                         for(i=0;i<250;i++);
                    }
               i=0;
               j=0;
}
/**
  * @brief  Main program.
  * @param  None
  * @retval None
  */
int main(void)
{
  /* Infinite loop */
  while (1)
  {
                    // ilk olarak kullanacagimiz pinlerin bagli oldugu portun clock'unu belirlemeliyiz.
     RCC_AHBPeriphClockCmd(RCC_APB2Periph_GPIOD,ENABLE);
      // daha sonra port d den hangi pinlerin kullanilacagini , bu pinlerin clock'unu ve mod'unu belirlemeliyiz.
     GPIO_initstructure.GPIO_Pin = GPIO_Pin_13 | GPIO_Pin_14 ;
     GPIO_initstructure.GPIO_Mode = GPIO_Mode_Out_OD;
     GPIO_initstructure.GPIO_Speed = GPIO_Speed_50MHz;
     
     // bu kadar ayarlama pin ayarlarini yapmak için yeterlidir. Simdi biz bu ayarlar1 kaydetmek zorundayiz. Daha sonra program calisacaktir.
     GPIO_Init(GPIOD,&GPIO_initstructure);
     
     // böylelikle pin ayarlamasi bitti . simdi bu pinlerle ne yapacagimizi bulmaliyiz.
     
     while(1)
     {
               GPIO_SetBits(GPIOD,GPIO_Pin_13);
               GPIO_SetBits(GPIOD,GPIO_Pin_14);
               delay();
               GPIO_ResetBits(GPIOD,GPIO_Pin_13);
               GPIO_ResetBits(GPIOD,GPIO_Pin_14);
               delay();
     }
  }
}
 
#ifdef  USE_FULL_ASSERT
 
/**
  * @brief  Reports the name of the source file and the source line number
  *         where the assert_param error has occurred.
  * @param  file: pointer to the source file name
  * @param  line: assert_param error line source number
  * @retval None
  */
void assert_failed(uint8_t* file, uint32_t line)

  /* User can add his own implementation to report the file name and line number,
     ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
 
  /* Infinite loop */
  while (1)
  {
  }
}
#endif

But when I load the code to the board , nothing happens. So I debugged the code but in debug , program not exist below code part. How can I solve this problem ? 
do
  {
    HSEStatus = RCC->CR & RCC_CR_HSERDY;
    StartUpCounter++;  
  } while((HSEStatus == 0) && (StartUpCounter != HSE_STARTUP_TIMEOUT));

Outcomes