Skip to content

STM32duino FreeRTOS does not work #237

Closed
@ogatatsu

Description

@ogatatsu

It is a simple blinking program but it does not work.

[env:bluepill_f103c8]
platform = ststm32
board = bluepill_f103c8
framework = arduino
lib_deps = STM32duino FreeRTOS
#include <Arduino.h>
#include <STM32FreeRTOS.h>

const uint8_t LED_PIN = PC13;

static void task(void *pvParameters)
{
  for (;;)
  {
    vTaskDelay(1000);
    digitalWrite(LED_PIN, HIGH);
    vTaskDelay(1000);
    digitalWrite(LED_PIN, LOW);
  }
}

void setup()
{
  pinMode(LED_PIN, OUTPUT);

  xTaskCreate(task, "task", 128, NULL, 1, NULL);
  vTaskStartScheduler();
  while (1)
    ;
}

void loop()
{
  // Not used.
}

It works fine when built with Arduino.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions