led blinking project not work
Hi friends!
I try to make a led blinking project my processor is stm32f103rg. I compile succesfully!
But it didnt work. Maybe I do some wrong configurations i don't know because (same code worked in keil and ride7)
(I attached my project below)
(I load hex file using st flash loader demonstrator.)
Regards
crossworktest.rar
-
Hi!
i solved problem using STARTUP_FROM_RESET define using preprocessor options > preprocessor definitons
it ok.
now i want to ask one more question
this is my sample code But it doesnt go to in delayx() function or nCount variable is not working.
if i use no optimization it works else it doesnt work or if i use volatile unsigned long nCount it also work so
how will i use local wariable ?
while(1)
{
GPIO_WriteBit( GPIOA, GPIO_Pin_9, Bit_SET );
//DelayxMs(1);
Delayx(1000);
GPIO_WriteBit( GPIOA, GPIO_Pin_9, Bit_RESET );
//DelayxMs(10);
Delayx(5000);
}//////////
void Delayx( unsigned long nCount )
{
for ( ; nCount != 0; nCount-- );
}//////
Please sign in to leave a comment.
Comments
1 comment