Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Erik Strand
lufa
Commits
a447ae13
Commit
a447ae13
authored
Oct 02, 2010
by
Dean Camera
Browse files
Fixed broken lock byte programming in the AVRISP-MKII clone project for some XMEGA targets.
parent
824ce103
Changes
3
Hide whitespace changes
Inline
Side-by-side
LUFA/ManPages/ChangeLog.txt
View file @
a447ae13
...
...
@@ -68,6 +68,7 @@
* - Fixed incorrect LEDs_ChangeLEDs() function in the Benito board LED driver
* - Fixed incorrect USB_DeviceState value when unconfiguring the device without an address set
* - Fixed broken FLASH/EEPROM programming in the AVRISP-MKII clone project when writing in non-paged mode and the polling byte cannot be used
* - Fixed broken lock byte programming in the AVRISP-MKII clone project for some XMEGA targets
*
* \section Sec_ChangeLog100807 Version 100807
* <b>New:</b>
...
...
Projects/AVRISP-MKII/Lib/XPROG/XMEGANVM.c
View file @
a447ae13
...
...
@@ -216,10 +216,19 @@ bool XMEGANVM_WriteByteMemory(const uint8_t WriteCommand, const uint32_t WriteAd
XMEGANVM_SendNVMRegAddress
(
XMEGA_NVM_REG_CMD
);
XPROGTarget_SendByte
(
WriteCommand
);
/* Send new memory byte to the memory
t
o the target */
/* Send new memory byte to the memory o
f
the target */
XPROGTarget_SendByte
(
PDI_CMD_STS
|
(
PDI_DATSIZE_4BYTES
<<
2
));
XMEGANVM_SendAddress
(
WriteAddress
);
XPROGTarget_SendByte
(
Byte
);
/* Lock bytes need a special confirmation sequence for the write to complete */
if
(
WriteCommand
==
XMEGA_NVM_CMD_WRITELOCK
)
{
/* Set CMDEX bit in NVM CTRLA register to start the Lock Byte write sequence */
XPROGTarget_SendByte
(
PDI_CMD_STS
|
(
PDI_DATSIZE_4BYTES
<<
2
));
XMEGANVM_SendNVMRegAddress
(
XMEGA_NVM_REG_CTRLA
);
XPROGTarget_SendByte
(
1
<<
0
);
}
return
true
;
}
...
...
Projects/AVRISP-MKII/Lib/XPROG/XPROGProtocol.c
View file @
a447ae13
...
...
@@ -324,8 +324,6 @@ static void XPROGProtocol_WriteMemory(void)
EraseBuffCommand
=
XMEGA_NVM_CMD_ERASEEEPROMPAGEBUFF
;
break
;
case
XPRG_MEM_TYPE_USERSIG
:
/* User signature is paged, but needs us to manually indicate the mode bits since the host doesn't set them */
WriteMemory_XPROG_Params
.
PageMode
=
(
XPRG_PAGEMODE_ERASE
|
XPRG_PAGEMODE_WRITE
);
WriteCommand
=
XMEGA_NVM_CMD_WRITEUSERSIG
;
break
;
case
XPRG_MEM_TYPE_FUSE
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment