From d5f76e666c5b4199bd476617f566ca7fd9dbab49 Mon Sep 17 00:00:00 2001 From: multicoder9 <205438007+multicoder9@users.noreply.github.com> Date: Mon, 31 Mar 2025 15:22:35 +0700 Subject: [PATCH] micropython/drivers/storage/sdcard/sdcard.py: Added 0x7F CRC for two more writeblocks cmd calls Signed-off-by: multicoder9 <205438007+multicoder9@users.noreply.github.com> --- micropython/drivers/storage/sdcard/sdcard.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/micropython/drivers/storage/sdcard/sdcard.py b/micropython/drivers/storage/sdcard/sdcard.py index 0500396e..1c1370c6 100644 --- a/micropython/drivers/storage/sdcard/sdcard.py +++ b/micropython/drivers/storage/sdcard/sdcard.py @@ -295,14 +295,14 @@ class SDCard: assert nblocks and not err, "Buffer length is invalid" if nblocks == 1: # CMD24: set write address for single block - if self.cmd(24, block_num * self.cdv, 0) != 0: + if self.cmd(24, block_num * self.cdv, 0x7F) != 0: raise OSError(5) # EIO # send the data self.write(_TOKEN_DATA, buf) else: # CMD25: set write address for first block - if self.cmd(25, block_num * self.cdv, 0) != 0: + if self.cmd(25, block_num * self.cdv, 0x7F) != 0: raise OSError(5) # EIO # send the data offset = 0