AnsweredAssumed Answered

Board Bring-up with STM8L051F3

Question asked by edmond yun on Jun 26, 2018
Latest reply on Jun 29, 2018 by edmond yun

Hi,

 

I need your help to find out the root cause of my issue,

please help to check the issue, thankful for your support in advance,

 

thanks.

 

issue,

when trying to do bring-up new board, we can't control any port related with LED.

Chip is STM8L051F3, used with STVP, IAR embedded workbench IDE - stm8

 

I can download hex file, but the symptom seems to be that CPU is no responsive, at all.....

 

please refer my code, I used STM8L15x_StdPeriph_Driver SDK, 

 

void main(void)
{
char ans;
/*High speed internal clock prescaler: 1*/
CLK_SYSCLKDivConfig(CLK_SYSCLKDiv_1);
GPIO_Init(LED_R_GPIO_PORT, LED_R_GPIO_PINS, GPIO_Mode_Out_PP_Low_Slow);
GPIO_Init(LED_B_GPIO_PORT, LED_B_GPIO_PINS, GPIO_Mode_Out_PP_Low_Slow);

while (1)
{
/* Toggle LED_R LED_B */
GPIO_ToggleBits(LED_R_GPIO_PORT, LED_R_GPIO_PINS);//void GPIO_ToggleBits(GPIO_TypeDef* GPIOx, uint8_t GPIO_Pin)
Delay(100);
GPIO_ToggleBits(LED_B_GPIO_PORT, LED_B_GPIO_PINS);

}

 

and I set up the environment of IAR as follows, 

Option -> c/c++ Compiler -> Preprocessor 

In Defined symbols item, add 2 option,

 

USE_STM8L1526_EVAL
STM8L05X_LD_VL

 

please help to let me know what it is problem, if necessary, I can upload the circuit,

 

thankful for your concern in advance,

thanks.

Outcomes