Manually pull PDI clock pin high for 1ms before disabling PDI mode in the AVRISP...
authorDean Camera <dean@fourwalledcubicle.com>
Wed, 27 Jan 2010 02:59:54 +0000 (02:59 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Wed, 27 Jan 2010 02:59:54 +0000 (02:59 +0000)
LUFA/ManPages/FutureChanges.txt
Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c

index 9006040..d2ba13f 100644 (file)
@@ -17,7 +17,6 @@
   *      -# Add ability to get number of bytes not written with pipe/endpoint write routines after an error\r
   *      -# Add standardized descriptor names to class driver structures\r
   *      -# Correct mishandling of error cases in Mass Storage demos\r
-  *      -# FIX BROKEN RNDIS HOST CLASS DRIVER (BLOCKING)\r
   *      -# TEST AND CORRECT TPI PROGRAMMING SUPPORT IN THE AVRISP-MKII PROJECT (BLOCKING)\r
   *  - Documentation/Support\r
   *      -# Remake AVRStudio project files\r
index 01c861f..05d5ec9 100644 (file)
@@ -230,6 +230,10 @@ void XPROGTarget_DisableTargetPDI(void)
        XPROGTarget_SetRxMode();\r
 \r
 #if defined(XPROG_VIA_HARDWARE_USART)\r
+       /* Set /RESET high for a one millisecond to ensure target device is restarted */\r
+       PORTD |= (1 << 5);\r
+       _delay_ms(1);\r
+\r
        /* Turn off receiver and transmitter of the USART, clear settings */\r
        UCSR1A |= (1 << TXC1) | (1 << RXC1);\r
        UCSR1B  = 0;\r
@@ -239,6 +243,10 @@ void XPROGTarget_DisableTargetPDI(void)
        DDRD  &= ~((1 << 5) | (1 << 3));\r
        PORTD &= ~((1 << 5) | (1 << 3) | (1 << 2));\r
 #else\r
+       /* Set /RESET high for a one millisecond to ensure target device is restarted */\r
+       BITBANG_PDICLOCK_PORT |= BITBANG_PDICLOCK_MASK;\r
+       _delay_ms(1);\r
+\r
        /* Set DATA and CLOCK lines to inputs */\r
        BITBANG_PDIDATA_DDR   &= ~BITBANG_PDIDATA_MASK;\r
        BITBANG_PDICLOCK_DDR  &= ~BITBANG_PDICLOCK_MASK;\r