@@ -882,9 +882,22 @@ static int IRAM_ATTR cause_sw_intr_to_core_wrapper(int core_id, int intr_no)
882882#if CONFIG_FREERTOS_UNICORE
883883 cause_sw_intr ((void * )intr_no );
884884#else /* CONFIG_FREERTOS_UNICORE */
885+ #if CONFIG_FREERTOS_SMP
886+ uint32_t state = portDISABLE_INTERRUPTS ();
887+ #else
888+ uint32_t state = portSET_INTERRUPT_MASK_FROM_ISR ();
889+ #endif
885890 if (xPortGetCoreID () == core_id ) {
886891 cause_sw_intr ((void * )intr_no );
892+ #if CONFIG_FREERTOS_SMP
893+ portRESTORE_INTERRUPTS (state );
894+ } else {
895+ portRESTORE_INTERRUPTS (state );
896+ #else
897+ portCLEAR_INTERRUPT_MASK_FROM_ISR (state );
887898 } else {
899+ portCLEAR_INTERRUPT_MASK_FROM_ISR (state );
900+ #endif
888901 err = esp_ipc_call (core_id , cause_sw_intr , (void * )intr_no );
889902 }
890903#endif /* !CONFIG_FREERTOS_UNICORE */
@@ -1505,11 +1518,7 @@ static void hli_queue_setup_pinned_to_core(int core_id)
15051518#if CONFIG_FREERTOS_UNICORE
15061519 hli_queue_setup_cb (NULL );
15071520#else /* CONFIG_FREERTOS_UNICORE */
1508- if (xPortGetCoreID () == core_id ) {
1509- hli_queue_setup_cb (NULL );
1510- } else {
1511- esp_ipc_call (core_id , hli_queue_setup_cb , NULL );
1512- }
1521+ esp_ipc_call_blocking (core_id , hli_queue_setup_cb , NULL );
15131522#endif /* !CONFIG_FREERTOS_UNICORE */
15141523}
15151524#endif /* CONFIG_BTDM_CTRL_HLI */
0 commit comments