Reduce PDI/TPI reset hold period from 1ms to 100us, as the former caused sporadic...
authorDean Camera <dean@fourwalledcubicle.com>
Thu, 21 Nov 2013 17:41:17 +0000 (18:41 +0100)
committerDean Camera <dean@fourwalledcubicle.com>
Thu, 21 Nov 2013 17:41:17 +0000 (18:41 +0100)
LUFA/DoxygenPages/ChangeLog.txt
Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c

index 7bd8b29..55150f4 100644 (file)
@@ -16,7 +16,7 @@
   *  - Library Applications:
   *   - Refactored out USB interface IDs in the demo applications into enums (thanks to Laszlo Monda)
   *   - AVRISP-MKII Clone Project PDI/TPI frequency increased from 250KHz to 2MHz as it is now stable
   *  - Library Applications:
   *   - Refactored out USB interface IDs in the demo applications into enums (thanks to Laszlo Monda)
   *   - AVRISP-MKII Clone Project PDI/TPI frequency increased from 250KHz to 2MHz as it is now stable
-  *   - Increased TPI/PDI handshake delay to 1ms from 1us to support targets with high amounts of capacitance on their
+  *   - Increased TPI/PDI handshake delay to 100us from 1us to support targets with high amounts of capacitance on their
   *     /RESET lines (thanks to Paul Duke)
   *
   *  <b>Fixed:</b>
   *     /RESET lines (thanks to Paul Duke)
   *
   *  <b>Fixed:</b>
index 165c769..180fed6 100644 (file)
@@ -52,7 +52,7 @@ void XPROGTarget_EnableTargetPDI(void)
 
        /* Set DATA line high for at least 90ns to disable /RESET functionality */
        PORTD |= (1 << 3);
 
        /* Set DATA line high for at least 90ns to disable /RESET functionality */
        PORTD |= (1 << 3);
-       _delay_ms(1);
+       _delay_us(100);
 
        /* Set up the synchronous USART for XMEGA communications - 8 data bits, even parity, 2 stop bits */
        UBRR1  = ((F_CPU / 2 / XPROG_HARDWARE_SPEED) - 1);
 
        /* Set up the synchronous USART for XMEGA communications - 8 data bits, even parity, 2 stop bits */
        UBRR1  = ((F_CPU / 2 / XPROG_HARDWARE_SPEED) - 1);
@@ -72,7 +72,7 @@ void XPROGTarget_EnableTargetTPI(void)
        /* Set /RESET line low for at least 400ns to enable TPI functionality */
        AUX_LINE_DDR  |=  AUX_LINE_MASK;
        AUX_LINE_PORT &= ~AUX_LINE_MASK;
        /* Set /RESET line low for at least 400ns to enable TPI functionality */
        AUX_LINE_DDR  |=  AUX_LINE_MASK;
        AUX_LINE_PORT &= ~AUX_LINE_MASK;
-       _delay_ms(1);
+       _delay_us(100);
 
        /* Set Tx and XCK as outputs, Rx as input */
        DDRD |=  (1 << 5) | (1 << 3);
 
        /* Set Tx and XCK as outputs, Rx as input */
        DDRD |=  (1 << 5) | (1 << 3);