Răsfoiți Sursa

components/freertos: fixed isr test failling when run multiple times

Felipe Neves 6 ani în urmă
părinte
comite
64a50f0423

+ 3 - 3
components/freertos/test/test_isr_latency.c

@@ -19,9 +19,8 @@ static SemaphoreHandle_t sync;
 static SemaphoreHandle_t end_sema;
 uint32_t cycle_before_trigger;
 uint32_t cycle_before_exit;
-uint32_t delta_enter_cycles;
-uint32_t delta_enter_cycles;
-uint32_t delta_exit_cycles;
+uint32_t delta_enter_cycles = 0;
+uint32_t delta_exit_cycles = 0;
 
 static void software_isr(void *arg) {
     (void)arg;
@@ -56,6 +55,7 @@ static void test_task(void *arg) {
     delta_enter_cycles /= 10000;
     delta_exit_cycles /= 10000;
 
+    esp_intr_free(handle);
     xSemaphoreGive(end_sema);
     vTaskDelete(NULL);
 }

+ 2 - 0
components/freertos/xtensa_context.S

@@ -96,6 +96,7 @@ Exit conditions:
     .align  4
 	.literal_position
     .align  4
+
 _xt_context_save:
     s32i    a2,  sp, XT_STK_A2
     s32i    a3,  sp, XT_STK_A3
@@ -195,6 +196,7 @@ _not_l1:
     #endif
 
     ret
+
 /*******************************************************************************
 
 _xt_context_restore