diff --git a/tulip/esp32s3/main.c b/tulip/esp32s3/main.c index 317df4577..b11f6574b 100644 --- a/tulip/esp32s3/main.c +++ b/tulip/esp32s3/main.c @@ -160,10 +160,14 @@ float compute_cpu_usage(uint8_t debug) { volatile UBaseType_t uxArraySize, x, i; const char* const tasks[] = { - "esp_timer", "sys_evt", "Tmr Svc", "ipc0", "ipc1", "main", "wifi", "IDLE0", "IDLE1", "tiT", + "IDLE0", "IDLE1", "Tmr Svc", "ipc0", "ipc1", "main", "wifi", "esp_timer", "sys_evt", "tiT", DISPLAY_TASK_NAME, USB_TASK_NAME, TOUCHSCREEN_TASK_NAME, TULIP_MP_TASK_NAME, MIDI_TASK_NAME, ALLES_TASK_NAME, ALLES_PARSE_TASK_NAME, ALLES_RECEIVE_TASK_NAME, ALLES_RENDER_TASK_NAME, ALLES_FILL_BUFFER_TASK_NAME, SEQUENCER_TASK_NAME, 0 }; + const uint8_t cores[] = {0, 0, 0, 0, 1, 0, 0, 0, 1, 0, DISPLAY_TASK_COREID, USB_TASK_COREID, TOUCHSCREEN_TASK_COREID, TULIP_MP_TASK_COREID, + MIDI_TASK_COREID, ALLES_TASK_COREID, ALLES_PARSE_TASK_COREID, ALLES_RECEIVE_TASK_COREID, ALLES_RENDER_TASK_COREID, ALLES_FILL_BUFFER_TASK_COREID, + SEQUENCER_TASK_COREID}; + uxArraySize = uxTaskGetNumberOfTasks(); pxTaskStatusArray = pvPortMalloc( uxArraySize * sizeof( TaskStatus_t ) ); uxArraySize = uxTaskGetSystemState( pxTaskStatusArray, uxArraySize, NULL ); @@ -176,9 +180,10 @@ float compute_cpu_usage(uint8_t debug) { } unsigned long counter_since_last[MAX_TASKS]; - unsigned long ulTotalRunTime = 0; - unsigned long freeTime = 0; - TaskStatus_t xTaskDetails; + unsigned long ulTotalRunTime_per_core[2]; + ulTotalRunTime_per_core[0] = 0; + ulTotalRunTime_per_core[1] = 0; + // We have to check for the names we want to track for(i=0;i