Procházet zdrojové kódy

Better debug messages when watchdog timeout occurs during sync transfer.

Petteri Aimonen před 3 roky
rodič
revize
9c4d4763ae

+ 6 - 0
lib/ZuluSCSI_platform_GD32F205/scsi_accel_sync.cpp

@@ -468,6 +468,12 @@ void scsi_accel_sync_send(const uint8_t* data, uint32_t count, volatile int *res
 
     while (TIMER_CNT(SCSI_SYNC_TIMER) > 0 && !*resetFlag);
 
+    if (*resetFlag)
+    {
+        azdbg("Bus reset during sync transfer, total ", (int)count,
+              " bytes, remaining ACK count ", (int)TIMER_CNT(SCSI_SYNC_TIMER));
+    }
+
     TIMER_CTL0(SCSI_SYNC_TIMER) = 0;
 }
 

+ 1 - 0
src/ZuluSCSI_log_trace.cpp

@@ -157,6 +157,7 @@ void scsiLogPhaseChange(int new_phase)
         g_DataChecksum = 0;
 
         if (old_phase >= 0 &&
+            scsiDev.target != NULL &&
             old_scsi_id == scsiDev.target->targetId &&
             old_sync_period != scsiDev.target->syncPeriod)
         {