Increased the speed of both software and hardware TPI/PDI programming modes of the...
authorDean Camera <dean@fourwalledcubicle.com>
Sun, 21 Feb 2010 05:44:12 +0000 (05:44 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Sun, 21 Feb 2010 05:44:12 +0000 (05:44 +0000)
LUFA/ManPages/ChangeLog.txt
Projects/AVRISP-MKII/Lib/V2Protocol.c
Projects/AVRISP-MKII/Lib/XPROG/XPROGProtocol.c
Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.h

index 5e2241d..f05ace3 100644 (file)
@@ -14,6 +14,7 @@
   *  <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
index cea42ea..f7e5e81 100644 (file)
@@ -42,6 +42,8 @@ uint32_t CurrentAddress;
 /** 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
@@ -68,6 +70,8 @@ void V2Protocol_ProcessCommand(void)
 {\r
        uint8_t V2Command = Endpoint_Read_Byte();\r
        \r
+       CommandTimedOut = false;\r
+       \r
        switch (V2Command)\r
        {\r
                case CMD_SIGN_ON:\r
index a6a5767..805eaa3 100644 (file)
@@ -124,9 +124,9 @@ static void XPROGProtocol_EnterXPROGMode(void)
                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
@@ -141,9 +141,9 @@ static void XPROGProtocol_EnterXPROGMode(void)
                /* 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
index d08a8b6..0c54ad4 100644 (file)
@@ -81,7 +81,7 @@
                #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