feilipu / Arduino_FreeRTOS_Library

A FreeRTOS Library for all Arduino ATmega Devices (Uno R3, Leonardo, Mega, etc).
MIT License
848 stars 204 forks source link

STM32FreeRTOS myservo can not work. #100

Closed Nanmei closed 3 years ago

Nanmei commented 3 years ago

1 2 `#include

include

Servo myservo; int pos = 0;

void vTask1(void *pvParameters){ myservo.attach(PA7); for(;;) { for(pos = 0; pos < 90; pos += 1){
myservo.write(pos);
vTaskDelay(20 / portTICK_PERIOD_MS);
} vTaskDelay(255 / portTICK_PERIOD_MS); for(pos = 90; pos>=1; pos-=1) {
myservo.write(pos);
vTaskDelay(20 / portTICK_PERIOD_MS);
} vTaskDelay(255 / portTICK_PERIOD_MS);

}

} void setup() { xTaskCreate(vTask1,NULL,64,NULL,1,NULL); } void loop(){ ; }`

This is my code , this code can not work in the STM32FreeRTOS.But this code can work in the arduino.I can't find the reason.

feilipu commented 3 years ago

Sorry, but I can't help you with STM32 code or issues.

Good luck.

Nanmei commented 3 years ago

I find the reason thanks