cancel
Showing results for 
Search instead for 
Did you mean: 

GPIO_ReadInputPin not working for STM8S003F3P6

mvk
Associate

The below code works with out the initialization

"GPIO_Init(GPIOA, GPIO_PIN_3, GPIO_MODE_OUT_PP_HIGH_SLOW);" ,

but does not work with initialization.

void main(void)

{

volatile uint8_t count;

count = 0x00;

GPIO_DeInit(GPIOA);

GPIO_Init(GPIOA, GPIO_PIN_3, GPIO_MODE_OUT_PP_HIGH_SLOW);

while (1)

{

count = 0x00 | GPIO_ReadInputPin(GPIOD, GPIO_PIN_5);

}

}

Could some one point to where I might be going wrong?

Thanks

0 REPLIES 0