feat(mbedtls): Add config for interrupt priority in AES and RSA(MPI)

This commit is contained in:
nilesh.kale
2023-09-25 13:28:29 +05:30
parent a9f7579e0a
commit cf4a7bb09d
4 changed files with 36 additions and 2 deletions

View File

@@ -188,8 +188,9 @@ static esp_err_t esp_aes_isr_initialise( void )
ESP_LOGE(TAG, "Failed to create intr semaphore");
return ESP_FAIL;
}
const int isr_flags = esp_intr_level_to_flags(CONFIG_MBEDTLS_AES_INTERRUPT_LEVEL);
esp_err_t ret = esp_intr_alloc(ETS_AES_INTR_SOURCE, 0, esp_aes_complete_isr, NULL, NULL);
esp_err_t ret = esp_intr_alloc(ETS_AES_INTR_SOURCE, isr_flags, esp_aes_complete_isr, NULL, NULL);
if (ret != ESP_OK) {
return ret;
}

View File

@@ -85,7 +85,9 @@ static esp_err_t esp_mpi_isr_initialise(void)
return ESP_FAIL;
}
esp_intr_alloc(ETS_RSA_INTR_SOURCE, 0, esp_mpi_complete_isr, NULL, NULL);
const int isr_flags = esp_intr_level_to_flags(CONFIG_MBEDTLS_MPI_INTERRUPT_LEVEL);
esp_intr_alloc(ETS_RSA_INTR_SOURCE, isr_flags, esp_mpi_complete_isr, NULL, NULL);
}
/* MPI is clocked proportionally to CPU clock, take power management lock */