diff --git a/LUFA/ManPages/ChangeLog.txt b/LUFA/ManPages/ChangeLog.txt index 5e2241d428a9f58ac942c5a2da58574a3dd06e5c..f05ace33d30c6b5b7b949ea2c7b4beb775b41e12 100644 --- a/LUFA/ManPages/ChangeLog.txt +++ b/LUFA/ManPages/ChangeLog.txt @@ -14,6 +14,7 @@ * <b>Changed:</b> * - AVRISP programmer project now has a more robust timeout system, allowing for a doubling of the software USART speed * for PDI and TPI programming + * - Increased the speed of both software and hardware TPI/PDI programming modes of the AVRISP project * * <b>Fixed:</b> * - (None) diff --git a/Projects/AVRISP-MKII/Lib/V2Protocol.c b/Projects/AVRISP-MKII/Lib/V2Protocol.c index cea42eae5fcb3f8a551ab282b5f489b546799b20..f7e5e810254c44e3125fba80197e95b4252bcfe3 100644 --- a/Projects/AVRISP-MKII/Lib/V2Protocol.c +++ b/Projects/AVRISP-MKII/Lib/V2Protocol.c @@ -42,6 +42,8 @@ uint32_t CurrentAddress; /** Flag to indicate that the next read/write operation must update the device's current address */ bool MustSetAddress; +bool CommandTimedOut; + /** Initializes the hardware and software associated with the V2 protocol command handling. */ void V2Protocol_Init(void) { @@ -68,6 +70,8 @@ void V2Protocol_ProcessCommand(void) { uint8_t V2Command = Endpoint_Read_Byte(); + CommandTimedOut = false; + switch (V2Command) { case CMD_SIGN_ON: diff --git a/Projects/AVRISP-MKII/Lib/XPROG/XPROGProtocol.c b/Projects/AVRISP-MKII/Lib/XPROG/XPROGProtocol.c index a6a57670b5d89fe909c80bdcb3a3ed7071c9b0b2..805eaa31fedf8e340714a4493d898fec6349fb47 100644 --- a/Projects/AVRISP-MKII/Lib/XPROG/XPROGProtocol.c +++ b/Projects/AVRISP-MKII/Lib/XPROG/XPROGProtocol.c @@ -124,9 +124,9 @@ static void XPROGProtocol_EnterXPROGMode(void) XPROGTarget_SendByte(PDI_CMD_STCS | PDI_RESET_REG); XPROGTarget_SendByte(PDI_RESET_KEY); - /* Lower direction change guard time to 8 USART bits */ + /* Lower direction change guard time to 0 USART bits */ XPROGTarget_SendByte(PDI_CMD_STCS | PDI_CTRL_REG); - XPROGTarget_SendByte(0x04); + XPROGTarget_SendByte(0x07); /* Enable access to the XPROG NVM bus by sending the documented NVM access key to the device */ XPROGTarget_SendByte(PDI_CMD_KEY); @@ -141,9 +141,9 @@ static void XPROGProtocol_EnterXPROGMode(void) /* Enable TPI programming mode with the attached target */ XPROGTarget_EnableTargetTPI(); - /* Lower direction change guard time to 8 USART bits */ + /* Lower direction change guard time to 0 USART bits */ XPROGTarget_SendByte(TPI_CMD_SSTCS | TPI_CTRL_REG); - XPROGTarget_SendByte(0x04); + XPROGTarget_SendByte(0x07); /* Enable access to the XPROG NVM bus by sending the documented NVM access key to the device */ XPROGTarget_SendByte(TPI_CMD_SKEY); diff --git a/Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.h b/Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.h index d08a8b653b04c89877e92fb01501108a63aa8608..0c54ad4cf35533f03a4bf65250d3b201ba9044b0 100644 --- a/Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.h +++ b/Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.h @@ -81,7 +81,7 @@ #endif /** Number of cycles between each clock when software USART mode is used */ - #define BITS_BETWEEN_USART_CLOCKS 100 + #define BITS_BETWEEN_USART_CLOCKS 80 /** Total number of bits in a single USART frame */ #define BITS_IN_USART_FRAME 12