/* Send the LDCS command to read the PDI STATUS register to see the NVM bus is active */\r
XPROGTarget_SendByte(PDI_CMD_LDCS | PDI_STATUS_REG);\r
if (XPROGTarget_ReceiveByte() & PDI_STATUS_NVM)\r
- return true;\r
+ {\r
+ TimeoutMSRemaining = COMMAND_TIMEOUT_MS;\r
+ return true;\r
+ }\r
}\r
\r
return false;\r
\r
/* Check to see if the BUSY flag is still set */\r
if (!(XPROGTarget_ReceiveByte() & (1 << 7)))\r
- return true;\r
+ {\r
+ TimeoutMSRemaining = COMMAND_TIMEOUT_MS;\r
+ return true;\r
+ }\r
}\r
\r
return false;\r