diff --git a/ports/esp32/modules/inisetup.py b/ports/esp32/modules/inisetup.py index 00d9a4eab8..3196f0c6f3 100644 --- a/ports/esp32/modules/inisetup.py +++ b/ports/esp32/modules/inisetup.py @@ -2,7 +2,7 @@ import uos from flashbdev import bdev def check_bootsec(): - buf = bytearray(bdev.SEC_SIZE) + buf = bytearray(bdev.ioctl(5, 0)) # 5 is SEC_SIZE bdev.readblocks(0, buf) empty = True for b in buf: