diff --git a/drivers/mtd_mci/mtd_mci.c b/drivers/mtd_mci/mtd_mci.c index 7c83260417..77da2a2230 100644 --- a/drivers/mtd_mci/mtd_mci.c +++ b/drivers/mtd_mci/mtd_mci.c @@ -118,10 +118,11 @@ static int mtd_mci_erase_sector(mtd_dev_t *dev, uint32_t sector, uint32_t count) { (void)dev; - while (count--) { - mci_ioctl(CTRL_ERASE_SECTOR, §or); - ++sector; - } + uint32_t arg[2] = { + sector, sector + count - 1 + }; + + mci_ioctl(CTRL_ERASE_SECTOR, arg); return 0; }