diff --git a/src/ZuluSCSI_cdrom.cpp b/src/ZuluSCSI_cdrom.cpp index 58750118..6b4d4520 100644 --- a/src/ZuluSCSI_cdrom.cpp +++ b/src/ZuluSCSI_cdrom.cpp @@ -1721,6 +1721,12 @@ static void doReadCD(uint32_t lba, uint32_t length, uint8_t sector_type, } assert(buf == bufstart + result_length); scsiStartWrite(bufstart, result_length); + + // Reset the watchdog while the transfer is progressing. + // If the host stops transferring, the watchdog will eventually expire. + // This is needed to avoid hitting the watchdog if the host performs + // a large transfer compared to its transfer speed. + platform_reset_watchdog(); } scsiFinishWrite(); diff --git a/src/ZuluSCSI_disk.cpp b/src/ZuluSCSI_disk.cpp index 3fdbf2e9..f4292a96 100644 --- a/src/ZuluSCSI_disk.cpp +++ b/src/ZuluSCSI_disk.cpp @@ -1671,6 +1671,12 @@ void diskDataOut() } platform_set_sd_callback(NULL, NULL); g_disk_transfer.bytes_sd += len; + + // Reset the watchdog while the transfer is progressing. + // If the host stops transferring, the watchdog will eventually expire. + // This is needed to avoid hitting the watchdog if the host performs + // a large transfer compared to its transfer speed. + platform_reset_watchdog(); } } @@ -1844,6 +1850,12 @@ static void start_dataInTransfer(uint8_t *buffer, uint32_t count) platform_poll(); diskEjectButtonUpdate(false); + + // Reset the watchdog while the transfer is progressing. + // If the host stops transferring, the watchdog will eventually expire. + // This is needed to avoid hitting the watchdog if the host performs + // a large transfer compared to its transfer speed. + platform_reset_watchdog(); } static void diskDataIn()