aboutsummaryrefslogtreecommitdiff
path: root/Projects/AVRISP-MKII/Lib
diff options
context:
space:
mode:
authorDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2012-02-08 18:29:17 +0000
committerDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2012-02-08 18:29:17 +0000
commit15123a8f3c92f383f96060f3b6efbc8bb93624c5 (patch)
tree455e1dc57265a77b4ee653b01d3a5d859b2f7bc7 /Projects/AVRISP-MKII/Lib
parentf030f6947bf98bb32cb0a3e0ac46eccf9ab69345 (diff)
Updated the AVRISP-MKII Clone programmer project to be compatible with the latest version of AVR Studio (version 5.1).
Changed the AVRISP-MKII Clone programmer project to report a fixed 3.3V VTARGET voltage on USB AVRs lacking an ADC instead of 5V to prevent warnings in AVR Studio 5.1 when programming XMEGA devices. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@2038 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'Projects/AVRISP-MKII/Lib')
-rw-r--r--Projects/AVRISP-MKII/Lib/V2ProtocolParams.c4
-rw-r--r--Projects/AVRISP-MKII/Lib/V2ProtocolParams.h6
-rw-r--r--Projects/AVRISP-MKII/Lib/XPROG/XPROGProtocol.c6
-rw-r--r--Projects/AVRISP-MKII/Lib/XPROG/XPROGProtocol.h5
4 files changed, 19 insertions, 2 deletions
diff --git a/Projects/AVRISP-MKII/Lib/V2ProtocolParams.c b/Projects/AVRISP-MKII/Lib/V2ProtocolParams.c
index c9b305c5..1ec2b042 100644
--- a/Projects/AVRISP-MKII/Lib/V2ProtocolParams.c
+++ b/Projects/AVRISP-MKII/Lib/V2ProtocolParams.c
@@ -60,11 +60,11 @@ static ParameterItem_t ParameterTable[] =
{ .ParamID = PARAM_SW_MINOR,
.ParamPrivileges = PARAM_PRIV_READ,
- .ParamValue = 0x0D },
+ .ParamValue = FIRMWARE_VERSION_MINOR },
{ .ParamID = PARAM_VTARGET,
.ParamPrivileges = PARAM_PRIV_READ,
- .ParamValue = 0x32 },
+ .ParamValue = (uint8_t)(3.3 * 10) },
{ .ParamID = PARAM_SCK_DURATION,
.ParamPrivileges = PARAM_PRIV_READ | PARAM_PRIV_WRITE,
diff --git a/Projects/AVRISP-MKII/Lib/V2ProtocolParams.h b/Projects/AVRISP-MKII/Lib/V2ProtocolParams.h
index d7bc9162..ab47664d 100644
--- a/Projects/AVRISP-MKII/Lib/V2ProtocolParams.h
+++ b/Projects/AVRISP-MKII/Lib/V2ProtocolParams.h
@@ -59,6 +59,12 @@
/** Total number of parameters in the parameter table */
#define TABLE_PARAM_COUNT (sizeof(ParameterTable) / sizeof(ParameterTable[0]))
+
+ #if (!defined(FIRMWARE_VERSION_MINOR) || defined(__DOXYGEN__))
+ /** Minor firmware version, reported to the host on request; must match the version
+ * the host is expecting, or it (may) reject further communications with the programmer. */
+ #define FIRMWARE_VERSION_MINOR 0x11
+ #endif
/* Type Defines: */
/** Type define for a parameter table entry indicating a PC readable or writable device parameter. */
diff --git a/Projects/AVRISP-MKII/Lib/XPROG/XPROGProtocol.c b/Projects/AVRISP-MKII/Lib/XPROG/XPROGProtocol.c
index 2e3d11fb..d3427309 100644
--- a/Projects/AVRISP-MKII/Lib/XPROG/XPROGProtocol.c
+++ b/Projects/AVRISP-MKII/Lib/XPROG/XPROGProtocol.c
@@ -455,6 +455,12 @@ static void XPROGProtocol_SetParam(void)
case XPRG_PARAM_NVMCSR_REG:
XPROG_Param_NVMCSRRegAddr = Endpoint_Read_8();
break;
+ case XPRG_PARAM_UNKNOWN_1:
+ /* TODO: Undocumented parameter added in AVRStudio 5.1, purpose unknown. Must ACK and discard or
+ the communication with AVRStudio 5.1 will fail.
+ */
+ Endpoint_Discard_16();
+ break;
default:
ReturnStatus = XPRG_ERR_FAILED;
break;
diff --git a/Projects/AVRISP-MKII/Lib/XPROG/XPROGProtocol.h b/Projects/AVRISP-MKII/Lib/XPROG/XPROGProtocol.h
index 367c85e2..523fc15b 100644
--- a/Projects/AVRISP-MKII/Lib/XPROG/XPROGProtocol.h
+++ b/Projects/AVRISP-MKII/Lib/XPROG/XPROGProtocol.h
@@ -49,6 +49,10 @@
/* Preprocessor Checks: */
#if ((BOARD == BOARD_XPLAIN) || (BOARD == BOARD_XPLAIN_REV1))
+ /* On the XPLAIN board, we only need PDI programming
+ for the ATXMEGA128A1 - disable ISP to prevent hardware
+ damage.
+ */
#undef ENABLE_ISP_PROTOCOL
#if !defined(ENABLE_XPROG_PROTOCOL)
@@ -98,6 +102,7 @@
#define XPRG_PARAM_EEPPAGESIZE 0x02
#define XPRG_PARAM_NVMCMD_REG 0x03
#define XPRG_PARAM_NVMCSR_REG 0x04
+ #define XPRG_PARAM_UNKNOWN_1 0x05
#define XPRG_PROTOCOL_PDI 0x00
#define XPRG_PROTOCOL_JTAG 0x01