@@ -878,9 +878,22 @@ static int IRAM_ATTR cause_sw_intr_to_core_wrapper(int core_id, int intr_no)
878878#if CONFIG_FREERTOS_UNICORE
879879 cause_sw_intr ((void * )intr_no );
880880#else /* CONFIG_FREERTOS_UNICORE */
881+ #if CONFIG_FREERTOS_SMP
882+ uint32_t state = portDISABLE_INTERRUPTS ();
883+ #else
884+ uint32_t state = portSET_INTERRUPT_MASK_FROM_ISR ();
885+ #endif
881886 if (xPortGetCoreID () == core_id ) {
882887 cause_sw_intr ((void * )intr_no );
888+ #if CONFIG_FREERTOS_SMP
889+ portRESTORE_INTERRUPTS (state );
890+ } else {
891+ portRESTORE_INTERRUPTS (state );
892+ #else
893+ portCLEAR_INTERRUPT_MASK_FROM_ISR (state );
883894 } else {
895+ portCLEAR_INTERRUPT_MASK_FROM_ISR (state );
896+ #endif
884897 err = esp_ipc_call (core_id , cause_sw_intr , (void * )intr_no );
885898 }
886899#endif /* !CONFIG_FREERTOS_UNICORE */
@@ -1501,11 +1514,7 @@ static void hli_queue_setup_pinned_to_core(int core_id)
15011514#if CONFIG_FREERTOS_UNICORE
15021515 hli_queue_setup_cb (NULL );
15031516#else /* CONFIG_FREERTOS_UNICORE */
1504- if (xPortGetCoreID () == core_id ) {
1505- hli_queue_setup_cb (NULL );
1506- } else {
1507- esp_ipc_call (core_id , hli_queue_setup_cb , NULL );
1508- }
1517+ esp_ipc_call_blocking (core_id , hli_queue_setup_cb , NULL );
15091518#endif /* !CONFIG_FREERTOS_UNICORE */
15101519}
15111520#endif /* CONFIG_BTDM_CTRL_HLI */
0 commit comments