I am testing STM32F103C6 developing board and I want to use TIMx_CNT value in main function like this.
int main(void)
{
while(1)
{
if(TIM2_CNT<500)
{
GPIO_SetBits(GPIOA, GPIO_Pin_4);
} else {
GPIO_ResetBits(GPIOA, GPIO_Pin_4);
}
}
}
Is this possible? Thanks.