Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running two tasks on M5Stack #43

Open
malbrook opened this issue Aug 5, 2019 · 0 comments
Open

Running two tasks on M5Stack #43

malbrook opened this issue Aug 5, 2019 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@malbrook
Copy link

malbrook commented Aug 5, 2019

Hi
I am working on a project that uses M5ez as the screen handler with the main screen giving access to the M5ez menus through a button but with the initial screen containing live data updated from a second task running on the other core in the M5. When I moved the code that displays new data on the screen from the main task which is also handling the web server to the second task I ran into an exception problem with the exception pointing to the call to clear the canvas.
0x400e1191: ezCanvas::clear() at Arduino Sketchbook\libraries\M5ez\src/M5ez.cpp line 2118
0x400d506f: appUpdateTemperature() at menu_functions.cpp line 53 (discriminator 2)
0x400dc17c: Task2Main(void*) at task2.cpp line 183
0x400897e1: vPortTaskWrapper at esp-idf-public/components/freertos/port.c line 355

Moving the calling code back to the main task removes the problem, any thoughts on why it only works in the main task and not in a task running on the second core. The code to start the second task is included below.

// Start task for second core
xTaskCreatePinnedToCore(
    Task2Main,      /* Task function. */
    "TaskCore2",    /* name of task. */
    3072,           /* Stack size of task */
    NULL,           /* parameter of the task */
    1,              /* priority of the task */
    &TaskCore2,     /* Task handle to keep track of created task */
    0               /* Core */
);  
@paultech paultech added the bug Something isn't working label Jul 14, 2020
@paultech paultech self-assigned this Jul 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants