* <b>Changed:</b>\r
* - AVRISP programmer project now has a more robust timeout system, allowing for a doubling of the software USART speed\r
* for PDI and TPI programming\r
+ * - Increased the speed of both software and hardware TPI/PDI programming modes of the AVRISP project\r
*\r
* <b>Fixed:</b>\r
* - (None)\r
/** Flag to indicate that the next read/write operation must update the device's current address */\r
bool MustSetAddress;\r
\r
+bool CommandTimedOut;\r
+\r
/** Initializes the hardware and software associated with the V2 protocol command handling. */\r
void V2Protocol_Init(void)\r
{\r
{\r
uint8_t V2Command = Endpoint_Read_Byte();\r
\r
+ CommandTimedOut = false;\r
+ \r
switch (V2Command)\r
{\r
case CMD_SIGN_ON:\r
XPROGTarget_SendByte(PDI_CMD_STCS | PDI_RESET_REG); \r
XPROGTarget_SendByte(PDI_RESET_KEY);\r
\r
- /* Lower direction change guard time to 8 USART bits */\r
+ /* Lower direction change guard time to 0 USART bits */\r
XPROGTarget_SendByte(PDI_CMD_STCS | PDI_CTRL_REG); \r
- XPROGTarget_SendByte(0x04);\r
+ XPROGTarget_SendByte(0x07);\r
\r
/* Enable access to the XPROG NVM bus by sending the documented NVM access key to the device */\r
XPROGTarget_SendByte(PDI_CMD_KEY); \r
/* Enable TPI programming mode with the attached target */\r
XPROGTarget_EnableTargetTPI();\r
\r
- /* Lower direction change guard time to 8 USART bits */\r
+ /* Lower direction change guard time to 0 USART bits */\r
XPROGTarget_SendByte(TPI_CMD_SSTCS | TPI_CTRL_REG);\r
- XPROGTarget_SendByte(0x04);\r
+ XPROGTarget_SendByte(0x07);\r
\r
/* Enable access to the XPROG NVM bus by sending the documented NVM access key to the device */\r
XPROGTarget_SendByte(TPI_CMD_SKEY); \r
#endif\r
\r
/** Number of cycles between each clock when software USART mode is used */\r
- #define BITS_BETWEEN_USART_CLOCKS 100\r
+ #define BITS_BETWEEN_USART_CLOCKS 80\r
\r
/** Total number of bits in a single USART frame */\r
#define BITS_IN_USART_FRAME 12\r