ums/nyx: reinit sd to update cal trimmers for max perf

This commit is contained in:
CTCaer 2021-03-17 09:12:30 +02:00
parent ef5a01433d
commit f21f13b15d
2 changed files with 4 additions and 0 deletions

View file

@ -1837,6 +1837,7 @@ int usb_device_gadget_ums(usb_ctxt_t *usbs)
// Initialize sdmmc. // Initialize sdmmc.
if (usbs->type == MMC_SD) if (usbs->type == MMC_SD)
{ {
sd_end();
sd_mount(); sd_mount();
sd_unmount(); sd_unmount();
ums.lun.sdmmc = &sd_sdmmc; ums.lun.sdmmc = &sd_sdmmc;

View file

@ -1269,6 +1269,9 @@ static lv_res_t _create_mbox_benchmark(bool sd_bench)
if (sd_bench) if (sd_bench)
{ {
storage = &sd_storage; storage = &sd_storage;
// Re-initialize to update trimmers.
sd_end();
res = !sd_mount(); res = !sd_mount();
} }
else else