projects
/
pub
/
lufa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
d41cd9a
)
Second patch to fix incorrect PDI/TPI programming speed.
author
Dean Camera
<dean@fourwalledcubicle.com>
Sun, 14 Nov 2010 06:44:57 +0000
(06:44 +0000)
committer
Dean Camera
<dean@fourwalledcubicle.com>
Sun, 14 Nov 2010 06:44:57 +0000
(06:44 +0000)
LUFA/ManPages/ChangeLog.txt
patch
|
blob
|
blame
|
history
Projects/AVRISP-MKII/Lib/ISP/ISPProtocol.c
patch
|
blob
|
blame
|
history
Projects/AVRISP-MKII/Lib/ISP/ISPTarget.c
patch
|
blob
|
blame
|
history
Projects/AVRISP-MKII/Lib/ISP/ISPTarget.h
patch
|
blob
|
blame
|
history
Projects/AVRISP-MKII/Lib/XPROG/XPROGProtocol.h
patch
|
blob
|
blame
|
history
Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c
patch
|
blob
|
blame
|
history
diff --git
a/LUFA/ManPages/ChangeLog.txt
b/LUFA/ManPages/ChangeLog.txt
index
7d4b2c1
..
1eda701
100644
(file)
--- a/
LUFA/ManPages/ChangeLog.txt
+++ b/
LUFA/ManPages/ChangeLog.txt
@@
-101,7
+101,7
@@
* - Fixed USBtoSerial and XPLAINBridge demos discarding data from the PC if the send buffer becomes full
* - Fixed broken input in the MagStripe reader project due to an incorrect HID report descriptor
* - Fixed incorrect PollingIntervalMS values in the demo/project/bootloader endpoint descriptors (thanks to MCS Electronics)
* - Fixed USBtoSerial and XPLAINBridge demos discarding data from the PC if the send buffer becomes full
* - Fixed broken input in the MagStripe reader project due to an incorrect HID report descriptor
* - Fixed incorrect PollingIntervalMS values in the demo/project/bootloader endpoint descriptors (thanks to MCS Electronics)
- * - Fixed PDI/TPI programming speed of ~250KHz in the AVRISP-MKII Clone project, instead of the desired 500KHz
+ * - Fixed PDI/TPI programming speed of ~250KHz in the AVRISP-MKII Clone project, instead of the desired 500KHz
(thanks to Tom Light)
*
* \section Sec_ChangeLog100807 Version 100807
* <b>New:</b>
*
* \section Sec_ChangeLog100807 Version 100807
* <b>New:</b>
diff --git
a/Projects/AVRISP-MKII/Lib/ISP/ISPProtocol.c
b/Projects/AVRISP-MKII/Lib/ISP/ISPProtocol.c
index
9056942
..
97e0fb3
100644
(file)
--- a/
Projects/AVRISP-MKII/Lib/ISP/ISPProtocol.c
+++ b/
Projects/AVRISP-MKII/Lib/ISP/ISPProtocol.c
@@
-66,7
+66,7
@@
void ISPProtocol_EnterISPMode(void)
/* Perform execution delay, initialize SPI bus */
ISPProtocol_DelayMS(Enter_ISP_Params.ExecutionDelayMS);
/* Perform execution delay, initialize SPI bus */
ISPProtocol_DelayMS(Enter_ISP_Params.ExecutionDelayMS);
- ISPTarget_
Init
();
+ ISPTarget_
EnableTargetISP
();
/* Continuously attempt to synchronize with the target until either the number of attempts specified
* by the host has exceeded, or the the device sends back the expected response values */
/* Continuously attempt to synchronize with the target until either the number of attempts specified
* by the host has exceeded, or the the device sends back the expected response values */
@@
-118,7
+118,7
@@
void ISPProtocol_LeaveISPMode(void)
/* Perform pre-exit delay, release the target /RESET, disable the SPI bus and perform the post-exit delay */
ISPProtocol_DelayMS(Leave_ISP_Params.PreDelayMS);
ISPTarget_ChangeTargetResetLine(false);
/* Perform pre-exit delay, release the target /RESET, disable the SPI bus and perform the post-exit delay */
ISPProtocol_DelayMS(Leave_ISP_Params.PreDelayMS);
ISPTarget_ChangeTargetResetLine(false);
- ISPTarget_
ShutDown
();
+ ISPTarget_
DisableTargetISP
();
ISPProtocol_DelayMS(Leave_ISP_Params.PostDelayMS);
Endpoint_Write_Byte(CMD_LEAVE_PROGMODE_ISP);
ISPProtocol_DelayMS(Leave_ISP_Params.PostDelayMS);
Endpoint_Write_Byte(CMD_LEAVE_PROGMODE_ISP);
diff --git
a/Projects/AVRISP-MKII/Lib/ISP/ISPTarget.c
b/Projects/AVRISP-MKII/Lib/ISP/ISPTarget.c
index
d315e9d
..
66a1c25
100644
(file)
--- a/
Projects/AVRISP-MKII/Lib/ISP/ISPTarget.c
+++ b/
Projects/AVRISP-MKII/Lib/ISP/ISPTarget.c
@@
-142,7
+142,7
@@
ISR(TIMER1_COMPA_vect, ISR_BLOCK)
/** Initialises the appropriate SPI driver (hardware or software, depending on the selected ISP speed) ready for
* communication with the attached target.
*/
/** Initialises the appropriate SPI driver (hardware or software, depending on the selected ISP speed) ready for
* communication with the attached target.
*/
-void ISPTarget_
Init
(void)
+void ISPTarget_
EnableTargetISP
(void)
{
uint8_t SCKDuration = V2Params_GetParameterValue(PARAM_SCK_DURATION);
{
uint8_t SCKDuration = V2Params_GetParameterValue(PARAM_SCK_DURATION);
@@
-167,7
+167,7
@@
void ISPTarget_Init(void)
/** Shuts down the current selected SPI driver (hardware or software, depending on the selected ISP speed) so that no
* further communications can occur until the driver is re-initialized.
*/
/** Shuts down the current selected SPI driver (hardware or software, depending on the selected ISP speed) so that no
* further communications can occur until the driver is re-initialized.
*/
-void ISPTarget_
ShutDown
(void)
+void ISPTarget_
DisableTargetISP
(void)
{
if (HardwareSPIMode)
{
{
if (HardwareSPIMode)
{
diff --git
a/Projects/AVRISP-MKII/Lib/ISP/ISPTarget.h
b/Projects/AVRISP-MKII/Lib/ISP/ISPTarget.h
index
aae4c5b
..
ba47fdd
100644
(file)
--- a/
Projects/AVRISP-MKII/Lib/ISP/ISPTarget.h
+++ b/
Projects/AVRISP-MKII/Lib/ISP/ISPTarget.h
@@
-69,8
+69,8
@@
extern bool HardwareSPIMode;
/* Function Prototypes: */
extern bool HardwareSPIMode;
/* Function Prototypes: */
- void ISPTarget_
Init
(void);
- void ISPTarget_
ShutDown
(void);
+ void ISPTarget_
EnableTargetISP
(void);
+ void ISPTarget_
DisableTargetISP
(void);
void ISPTarget_ConfigureRescueClock(void);
void ISPTarget_ConfigureSoftwareISP(const uint8_t SCKDuration);
uint8_t ISPTarget_TransferSoftSPIByte(const uint8_t Byte);
void ISPTarget_ConfigureRescueClock(void);
void ISPTarget_ConfigureSoftwareISP(const uint8_t SCKDuration);
uint8_t ISPTarget_TransferSoftSPIByte(const uint8_t Byte);
diff --git
a/Projects/AVRISP-MKII/Lib/XPROG/XPROGProtocol.h
b/Projects/AVRISP-MKII/Lib/XPROG/XPROGProtocol.h
index
5418411
..
e5952a1
100644
(file)
--- a/
Projects/AVRISP-MKII/Lib/XPROG/XPROGProtocol.h
+++ b/
Projects/AVRISP-MKII/Lib/XPROG/XPROGProtocol.h
@@
-113,7
+113,6
@@
extern uint16_t XPROG_Param_EEPageSize;
extern uint8_t XPROG_Param_NVMCSRRegAddr;
extern uint8_t XPROG_Param_NVMCMDRegAddr;
extern uint16_t XPROG_Param_EEPageSize;
extern uint8_t XPROG_Param_NVMCSRRegAddr;
extern uint8_t XPROG_Param_NVMCMDRegAddr;
- extern uint8_t XPROG_SelectedProtocol;
/* Function Prototypes: */
void XPROGProtocol_SetMode(void);
/* Function Prototypes: */
void XPROGProtocol_SetMode(void);
diff --git
a/Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c
b/Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c
index
5d59f7f
..
8760e62
100644
(file)
--- a/
Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c
+++ b/
Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c
@@
-55,7
+55,7
@@
void XPROGTarget_EnableTargetPDI(void)
_delay_us(1);
/* Set up the synchronous USART for XMEGA communications - 8 data bits, even parity, 2 stop bits */
_delay_us(1);
/* Set up the synchronous USART for XMEGA communications - 8 data bits, even parity, 2 stop bits */
- UBRR1 = (
F_CPU / XPROG_HARDWARE_SPEED
);
+ UBRR1 = (
(F_CPU / 2 / XPROG_HARDWARE_SPEED) - 1
);
UCSR1B = (1 << TXEN1);
UCSR1C = (1 << UMSEL10) | (1 << UPM11) | (1 << USBS1) | (1 << UCSZ11) | (1 << UCSZ10) | (1 << UCPOL1);
UCSR1B = (1 << TXEN1);
UCSR1C = (1 << UMSEL10) | (1 << UPM11) | (1 << USBS1) | (1 << UCSZ11) | (1 << UCSZ10) | (1 << UCPOL1);