feat(ds): use RCC atomic block to enable/reset the DS peripheral

This commit is contained in:
harshal.patil
2023-10-11 14:59:04 +05:30
parent 18b93e9564
commit 43864f7fb4
10 changed files with 169 additions and 10 deletions
+9 -2
View File
@@ -266,7 +266,11 @@ static void ds_acquire_enable(void)
}
periph_module_enable(PERIPH_SHA_MODULE);
periph_module_enable(PERIPH_DS_MODULE);
DS_RCC_ATOMIC() {
ds_ll_enable_bus_clock(true);
ds_ll_reset_register();
}
hmac_hal_start();
}
@@ -275,7 +279,10 @@ static void ds_disable_release(void)
{
ds_hal_finish();
periph_module_disable(PERIPH_DS_MODULE);
DS_RCC_ATOMIC() {
ds_ll_enable_bus_clock(false);
}
periph_module_disable(PERIPH_SHA_MODULE);
HMAC_RCC_ATOMIC() {