Browse Source

Put ESP32 I2S stepper task and Marlin on the same core (#16874)

vivian-ng 4 years ago
parent
commit
4c6f695bea
No account linked to committer's email address
2 changed files with 3 additions and 3 deletions
  1. 1
    1
      Marlin/src/HAL/HAL_ESP32/i2s.cpp
  2. 2
    2
      Marlin/src/core/boards.h

+ 1
- 1
Marlin/src/HAL/HAL_ESP32/i2s.cpp View File

@@ -308,7 +308,7 @@ int i2s_init() {
308 308
   esp_intr_enable(i2s_isr_handle);
309 309
 
310 310
   // Create the task that will feed the buffer
311
-  xTaskCreate(stepperTask, "StepperTask", 10000, nullptr, 1, nullptr);
311
+  xTaskCreatePinnedToCore(stepperTask, "StepperTask", 10000, nullptr, 1, nullptr, CONFIG_ARDUINO_RUNNING_CORE); // run I2S stepper task on same core as rest of Marlin
312 312
 
313 313
   // Route the i2s pins to the appropriate GPIO
314 314
   gpio_matrix_out_check(I2S_DATA, I2S0O_DATA_OUT23_IDX, 0, 0);

+ 2
- 2
Marlin/src/core/boards.h View File

@@ -335,8 +335,8 @@
335 335
 // Espressif ESP32 WiFi
336 336
 //
337 337
 #define BOARD_ESPRESSIF_ESP32         6000  // Generic ESP32
338
-#define BOARD_MRR_ESPA                6001
339
-#define BOARD_MRR_ESPE                6002
338
+#define BOARD_MRR_ESPA                6001  // MRR ESPA board based on ESP32 (native pins only)
339
+#define BOARD_MRR_ESPE                6002  // MRR ESPE board based on ESP32 (with I2S stepper stream)
340 340
 #define BOARD_E4D_BOX                 6003  // E4d@BOX
341 341
 
342 342
 //

Loading…
Cancel
Save