Skip to content

Error with ESP32-C3-M1 #8

@philipPerlick

Description

@philipPerlick

After connecting with the Phyphox-App, the ESP crashes with an error:
FreeRTOS: xTaskCreatePinnedToCore: Invalid core ID (1)

In my case the problem appeared in the startTask function of 'phyphoxBLE_ESP32.cpp':
xTaskCreatePinnedToCore(staticStartTask, "TaskTransfer",10000, NULL,1, &TaskTransfer, 1);

According to the documentation of FreeRTOS I could fix it, by replacing the above line with:
xTaskCreatePinnedToCore(staticStartTask, "TaskTransfer", 10000, NULL, 1, &TaskTransfer, tskNO_AFFINITY);

FreeRTOS docs: https://docs.espressif.com/projects/esp-idf/en/v4.3/esp32/api-reference/system/freertos.html

Code to reproduce:

#include <phyphoxBle.h>

void setup() {
   PhyphoxBLE::start();
}
void loop() {
   float voltage = analogRead(34)*3.3/4096.0;
   PhyphoxBLE::write(voltage);
   delay(50);
}

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