Beginner stm32 olimexino. blynk problem

Hello,
I have a brand new olimexino stm32f103 OLIMEXINO-STM32 - Open Source Hardware Board . Because I’m not interested by maple IDE or espruino, I tried to use it with platform io and stm32cube framework.

here is my code for blynk the built in LED :

#include "stm32f1xx.h"

void SystemClock_Config(void);
static void MX_GPIO_Init(void);

int main(void) {
    // Initialisation du système
    HAL_Init();
    SystemClock_Config();
    MX_GPIO_Init();
    
    // Boucle principale
    while (1) {
        // Allume la LED2
        HAL_GPIO_WritePin(GPIOA, GPIO_PIN_1, GPIO_PIN_SET);
        HAL_Delay(500);  // Pause de 500 ms

        // Éteint la LED2
        HAL_GPIO_WritePin(GPIOA, GPIO_PIN_1, GPIO_PIN_RESET);
        HAL_Delay(500);  // Pause de 500 ms
    }
}

void SystemClock_Config(void) {
    // Configuration de l'horloge système (généré par STM32CubeMX si nécessaire)
}

static void MX_GPIO_Init(void) {
    // Active l'horloge GPIOA
    __HAL_RCC_GPIOA_CLK_ENABLE();

    // Configuration de la broche GPIO pour la LED2
    GPIO_InitTypeDef GPIO_InitStruct = {0};
    GPIO_InitStruct.Pin = GPIO_PIN_1;
    GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
    GPIO_InitStruct.Pull = GPIO_NOPULL;
    GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
    HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
}

Problem is, the LED turn ON but never turn OFF.

I don’t know what to do, if you can help me,
thank you

1 Like