why my hal delay function working weird?
Hi all,
This is my first time in stm32 mcu's and since today i struggled to manage to install all needed software to my old win7 pc. Finally at 2am i managed to success. Then after desided to program my bluepill quick before go to sleep. I started with blink program using hal_delay function. but it seems it works reverse for some reason.
This is my ide code;
while (1)
{
/* USER CODE END WHILE */
HAL_GPIO_WritePin(GPIOC, GPIO_PIN_13, GPIO_PIN_SET);
HAL_Delay(4000);
HAL_GPIO_WritePin(GPIOC, GPIO_PIN_13, GPIO_PIN_RESET);
HAL_Delay(1000);
/* USER CODE BEGIN 3 */
}The problem is when above code generated and uploaded to stm32f103 , led turn on for 1sec and turn off for 4 seconds(if i manage to see the led correctly :p ). But i thought it must be reverse. Mean, must turn on for 4 sec and off for 1 sec, correct me if im wrong ?
This is just a simple blink pc13 pin on bluepill nothing more but it seems im doing something wrong with it that i couldnt understand.
Here are my ioc file looks like;

