AnsweredAssumed Answered

Not Able to drive GPIO pin on STM8L Discovery board

Question asked by kumar.sachin.001 on Jul 31, 2014
Latest reply on Aug 29, 2014 by prasad.balmukund
Hi ,

I am not able to see any voltage changes on GPIO pins of stm8l discovery.

I have written the code, its compiling properly and i also could see the ODR register changing its value .

I am using STVD and cosmic compiler

/* MAIN.C file
 * 
 * Copyright (c) 2002-2005 STMicroelectronics
 */


#include "stm8l15x.h"


void delay_s(void);
main()
{
     
     
     CLK_HSICmd(ENABLE);
     GPIO_DeInit(GPIOD);
     GPIO_Init(GPIOD,GPIO_Pin_4,GPIO_Mode_Out_OD_Low_Fast);
     while(1)
     {
     GPIO_WriteBit(GPIOD,GPIO_Pin_4,SET);
     
          delay_s();
     GPIO_WriteBit(GPIOD,GPIO_Pin_4,RESET);
}
     
     
     
}




void delay_s()
{
     uint8_t i,j;
     for(j=0;j<150;j++);
     
     }
          

Thanks ,
Sachin.

Outcomes