mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-17 05:02:07 +00:00
Manually pull PDI clock pin high for 1ms before disabling PDI mode in the AVRISP-MKII project, to ensure that the PDI bus is disabled in the target and /RESET functionality restored.
This commit is contained in:
parent
eb99b1ec90
commit
2059fd8b1a
@ -17,7 +17,6 @@
|
|||||||
* -# Add ability to get number of bytes not written with pipe/endpoint write routines after an error
|
* -# Add ability to get number of bytes not written with pipe/endpoint write routines after an error
|
||||||
* -# Add standardized descriptor names to class driver structures
|
* -# Add standardized descriptor names to class driver structures
|
||||||
* -# Correct mishandling of error cases in Mass Storage demos
|
* -# Correct mishandling of error cases in Mass Storage demos
|
||||||
* -# FIX BROKEN RNDIS HOST CLASS DRIVER (BLOCKING)
|
|
||||||
* -# TEST AND CORRECT TPI PROGRAMMING SUPPORT IN THE AVRISP-MKII PROJECT (BLOCKING)
|
* -# TEST AND CORRECT TPI PROGRAMMING SUPPORT IN THE AVRISP-MKII PROJECT (BLOCKING)
|
||||||
* - Documentation/Support
|
* - Documentation/Support
|
||||||
* -# Remake AVRStudio project files
|
* -# Remake AVRStudio project files
|
||||||
|
@ -230,6 +230,10 @@ void XPROGTarget_DisableTargetPDI(void)
|
|||||||
XPROGTarget_SetRxMode();
|
XPROGTarget_SetRxMode();
|
||||||
|
|
||||||
#if defined(XPROG_VIA_HARDWARE_USART)
|
#if defined(XPROG_VIA_HARDWARE_USART)
|
||||||
|
/* Set /RESET high for a one millisecond to ensure target device is restarted */
|
||||||
|
PORTD |= (1 << 5);
|
||||||
|
_delay_ms(1);
|
||||||
|
|
||||||
/* Turn off receiver and transmitter of the USART, clear settings */
|
/* Turn off receiver and transmitter of the USART, clear settings */
|
||||||
UCSR1A |= (1 << TXC1) | (1 << RXC1);
|
UCSR1A |= (1 << TXC1) | (1 << RXC1);
|
||||||
UCSR1B = 0;
|
UCSR1B = 0;
|
||||||
@ -239,6 +243,10 @@ void XPROGTarget_DisableTargetPDI(void)
|
|||||||
DDRD &= ~((1 << 5) | (1 << 3));
|
DDRD &= ~((1 << 5) | (1 << 3));
|
||||||
PORTD &= ~((1 << 5) | (1 << 3) | (1 << 2));
|
PORTD &= ~((1 << 5) | (1 << 3) | (1 << 2));
|
||||||
#else
|
#else
|
||||||
|
/* Set /RESET high for a one millisecond to ensure target device is restarted */
|
||||||
|
BITBANG_PDICLOCK_PORT |= BITBANG_PDICLOCK_MASK;
|
||||||
|
_delay_ms(1);
|
||||||
|
|
||||||
/* Set DATA and CLOCK lines to inputs */
|
/* Set DATA and CLOCK lines to inputs */
|
||||||
BITBANG_PDIDATA_DDR &= ~BITBANG_PDIDATA_MASK;
|
BITBANG_PDIDATA_DDR &= ~BITBANG_PDIDATA_MASK;
|
||||||
BITBANG_PDICLOCK_DDR &= ~BITBANG_PDICLOCK_MASK;
|
BITBANG_PDICLOCK_DDR &= ~BITBANG_PDICLOCK_MASK;
|
||||||
|
Loading…
Reference in New Issue
Block a user