mirror of
https://github.com/espressif/esp-idf.git
synced 2026-08-18 06:35:35 +03:00
fix(esp_security): Power up MPI memory registers when enabling MPI
Co-authored-by: Li HongXi <lihongxi@espressif.com>
This commit is contained in:
@@ -80,7 +80,10 @@ void esp_crypto_mpi_enable_periph_clk(bool enable)
|
||||
MPI_RCC_ATOMIC() {
|
||||
mpi_ll_enable_bus_clock(enable);
|
||||
if (enable) {
|
||||
mpi_ll_power_up();
|
||||
mpi_ll_reset_register();
|
||||
} else {
|
||||
mpi_ll_power_down();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -253,12 +253,14 @@ static void ds_acquire_enable(void)
|
||||
// We also enable SHA and HMAC here. SHA is used by HMAC, HMAC is used by DS.
|
||||
esp_crypto_hmac_enable_periph_clk(true);
|
||||
esp_crypto_sha_enable_periph_clk(true);
|
||||
esp_crypto_mpi_enable_periph_clk(true);
|
||||
esp_crypto_ds_enable_periph_clk(true);
|
||||
}
|
||||
|
||||
static void ds_disable_release(void)
|
||||
{
|
||||
esp_crypto_ds_enable_periph_clk(false);
|
||||
esp_crypto_mpi_enable_periph_clk(false);
|
||||
esp_crypto_sha_enable_periph_clk(false);
|
||||
esp_crypto_hmac_enable_periph_clk(false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user