Forum Menu




 


Log in Problems?
New User? Sign Up!
AVR Freaks Forum Index

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
martincol
PostPosted: Feb 03, 2010 - 05:44 PM
Rookie


Joined: Dec 30, 2009
Posts: 29


Hello,

I have a small problem, the Xplain working (as AVRISP-MKII) with WinXP just fine! But in Windows 7 (32-bit) does not work, there is the following error:

avrdude -p atxmega128a1 -P usb -c avrispv2 -U flash:w:test4.hex
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive

or with -B 10

avrdude -p atxmega128a1 -P usb -c avrispv2 -B 10 -U flash:w:test4.hex
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive

the original AVRISP-MKII is working fine!

Greetings
 
 View user's profile Send private message  
Reply with quote Back to top
dandumit
PostPosted: Jul 16, 2010 - 02:22 PM
Newbie


Joined: Sep 13, 2005
Posts: 9
Location: Bucharest

Hello,
Great job Dean !
It worked for me seamless !
I still didn't manage to make it work with avrdude.

I found that it's an issue on having it working on both avrdude and avrstudio

http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=91244&postdays=0&postorder=asc&highlight=abcminiuser&start=20

Regards,
Daniel


Last edited by dandumit on Jul 28, 2010 - 03:06 PM; edited 1 time in total
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
abcminiuser
PostPosted: Jul 17, 2010 - 01:59 AM
Moderator


Joined: Jan 23, 2004
Posts: 9817
Location: Trondheim, Norway

For everyone: I'm now posting builds of the firmware on my site - http://www.fourwalledcubicle.com/XPLAIN.php - for those who do not want to compile it themselves. The build on my site is currently for AVRStudio only (not avrdude) but I'll start uploading avrdude ones from this week forward also.

The latest firmware revisions are MUCH, MUCH more reliable when in serial bridge mode -- lost characters are now the exception rather than the rule, and the baud rate is configurable in the user's terminal.


dandumit: For AVRDude on Windows you need to recompile with the libUSB compat compile time option.


- Dean Twisted Evil

_________________
Atmel Studio 6.1 is now released, grab it here.
Report AS6/ASF bugs here.
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
electronic.designer
PostPosted: Nov 22, 2010 - 06:46 AM
Hangaround


Joined: May 27, 2010
Posts: 396
Location: The land of Cyrus the Great

I built a LUFA based XMEGA programmer with AT90USB1287 and it works fine. There are some questions:

1- As I use IAR for C programming (and not gcc), the first question is about changing َAT90US1287 to other part numbers. Is it sufficient to change MCU = at90usb1287 to MCU=at90usb646(or other parts) in makefile and then recompile in AVR Studio?

2- Can AT90USB82 be used for this programmer?

3- There is an automatic update feature in Atmel AVRISPMKII for new versions of AVR Studio. Is this feature present in LUFA based MKII?

_________________
Ozhan K.
 
 View user's profile Send private message  
Reply with quote Back to top
abcminiuser
PostPosted: Nov 22, 2010 - 07:14 AM
Moderator


Joined: Jan 23, 2004
Posts: 9817
Location: Trondheim, Norway

Quote:

1- As I use IAR for C programming (and not gcc), the first question is about changing َAT90US1287 to other part numbers. Is it sufficient to change MCU = at90usb1287 to MCU=at90usb646(or other parts) in makefile and then recompile in AVR Studio?



Yes, the makefile will control everything you need, as all my source code for the project adjusts as needed to suit. This also applies for the other makefile settings - just make your changes, and recompile with a "make clean" followed by a "make all".

Quote:

2- Can AT90USB82 be used for this programmer?


Technically yes, with reduced functionality. Due to the limited space available you will need to either disable ISP functionality, or disable PDI/TPI functionality via the makefile. Future revisions may be able to fit into the 8K of the AT90USB82 without this restriction.

Quote:

3- There is an automatic update feature in Atmel AVRISPMKII for new versions of AVR Studio. Is this feature present in LUFA based MKII?


No, as AVRStudio believes the USB AVR to be a real AVRISP-MKII, thus even if it was possible to do so it would be disastrous. You will need to update manually with each (roughly 2 month interval) LUFA release, or as needed from the SVN.

- Dean Twisted Evil

_________________
Atmel Studio 6.1 is now released, grab it here.
Report AS6/ASF bugs here.
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
electronic.designer
PostPosted: Nov 22, 2010 - 07:29 AM
Hangaround


Joined: May 27, 2010
Posts: 396
Location: The land of Cyrus the Great

Thanks Dean.
Also I saw a new difference in reading VTarget(in HW Settings window). This voltage is zero for LUFA based programmer and 3.3v for Atmel MKII.

_________________
Ozhan K.
 
 View user's profile Send private message  
Reply with quote Back to top
abcminiuser
PostPosted: Nov 22, 2010 - 07:42 AM
Moderator


Joined: Jan 23, 2004
Posts: 9817
Location: Trondheim, Norway

Quote:

Also I saw a new difference in reading VTarget(in HW Settings window). This voltage is zero for LUFA based programmer and 3.3v for Atmel MKII.


The ADC channel used to detect VTARGET is configured in the makefile - it default to ADC channel 2. Connect ADC2 of your AVR to your target's VCC to detect the target programming level. Note that if your board is running off a lower voltage than the target board, you'll need to add in a resistive divider and set the scale factor in the makefile accordingly.

On the USB AVRs without an inbuilt ADC, the VTARGET value will be reported as 5V at all times.

- Dean Twisted Evil

_________________
Atmel Studio 6.1 is now released, grab it here.
Report AS6/ASF bugs here.
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
electronic.designer
PostPosted: Nov 22, 2010 - 08:33 AM
Hangaround


Joined: May 27, 2010
Posts: 396
Location: The land of Cyrus the Great

Thanks again.
Quote:
Due to the limited space available you will need to either disable ISP functionality, or disable PDI/TPI functionality via the makefile.

How can ISP functionality be disabled via the makefile for using َAT90USB82 as a PDI programmer?

_________________
Ozhan K.
 
 View user's profile Send private message  
Reply with quote Back to top
abcminiuser
PostPosted: Nov 22, 2010 - 08:45 AM
Moderator


Joined: Jan 23, 2004
Posts: 9817
Location: Trondheim, Norway

Quote:

How can ISP functionality be disabled via the makefile for using َAT90USB82 as a PDI programmer?


Just change the line:

Code:
LUFA_OPTS += -D ENABLE_ISP_PROTOCOL


To:

Code:
#LUFA_OPTS += -D ENABLE_ISP_PROTOCOL


In the makefile and recompile.

- Dean Twisted Evil

_________________
Atmel Studio 6.1 is now released, grab it here.
Report AS6/ASF bugs here.
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
electronic.designer
PostPosted: Mar 14, 2011 - 08:10 AM
Hangaround


Joined: May 27, 2010
Posts: 396
Location: The land of Cyrus the Great

I have some reports from LUFA based mkii users about corruption of at90usb162 firmware, after a few microcontroller programming. The problem is solved by reprogramming of at90usb162 (by FLIP). What can be the reason for this problem?

_________________
Ozhan K.
 
 View user's profile Send private message  
Reply with quote Back to top
GordonFreeman
PostPosted: Mar 14, 2011 - 12:54 PM
Hangaround


Joined: Oct 30, 2008
Posts: 333
Location: Minnesota, USA

How do you know firmware is corrupted? What happens? What's the hardware?

_________________
$12 RS-232 Level Shifter
http://www.xbitinc.com/products/RS%252d232-Level-Shifter-with-DB9-Connector.html
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
electronic.designer
PostPosted: Mar 14, 2011 - 07:11 PM
Hangaround


Joined: May 27, 2010
Posts: 396
Location: The land of Cyrus the Great

Quote:
How do you know firmware is corrupted?

Because by roprogramming the at90usb, programmer returns to normal operation.

_________________
Ozhan K.
 
 View user's profile Send private message  
Reply with quote Back to top
abcminiuser
PostPosted: Mar 15, 2011 - 12:09 AM
Moderator


Joined: Jan 23, 2004
Posts: 9817
Location: Trondheim, Norway

Hmmm. I can't think of any reasonable way that the firmware in the programmer itself could be coming corrupt, unless the bootloader's reprogramming routines were firing somehow. Do you have a procedure to replicate the issue?

Does the programmer become completely unresponsive, or does it just fail to connect to a target properly?

- Dean Twisted Evil

_________________
Atmel Studio 6.1 is now released, grab it here.
Report AS6/ASF bugs here.
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
electronic.designer
PostPosted: Mar 15, 2011 - 01:21 PM
Hangaround


Joined: May 27, 2010
Posts: 396
Location: The land of Cyrus the Great

abcminiuser wrote:

Does the programmer become completely unresponsive

I asked the programmer owner and he told about a "connection fail" (or "fail connection"?) message from AVRStudio.

_________________
Ozhan K.
 
 View user's profile Send private message  
Reply with quote Back to top
Bingo600
PostPosted: Mar 15, 2011 - 04:53 PM
Raving lunatic


Joined: Apr 25, 2004
Posts: 3808
Location: Denmark

@Dean ...

Could one (easily) "Trick" an UNO into acting as a ISPMKII ?
I mean the M8-USB chip could signal the correct vid/pid & act as a serial gw to the m328 , doing the programming ...

/Bingo
 
 View user's profile Send private message  
Reply with quote Back to top
golubev
PostPosted: Mar 15, 2011 - 04:58 PM
Newbie


Joined: Mar 04, 2011
Posts: 17


Hello...
Will this AVRISP-MKII works on xmega-a1 xplained (ie.32uc3b1256)?
 
 View user's profile Send private message  
Reply with quote Back to top
GordonFreeman
PostPosted: Mar 15, 2011 - 05:09 PM
Hangaround


Joined: Oct 30, 2008
Posts: 333
Location: Minnesota, USA

golubev wrote:
Hello...
Will this AVRISP-MKII works on xmega-a1 xplained (ie.32uc3b1256)?


yes, LUFA already comes with a pre-configured project for the XPLAIN
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
golubev
PostPosted: Mar 15, 2011 - 05:46 PM
Newbie


Joined: Mar 04, 2011
Posts: 17


That XPLAIN uses at90usb1287, I'm talking about XPLAIN with 32uc3b1256 as its usb controller.
 
 View user's profile Send private message  
Reply with quote Back to top
abcminiuser
PostPosted: Mar 15, 2011 - 09:34 PM
Moderator


Joined: Jan 23, 2004
Posts: 9817
Location: Trondheim, Norway

Quote:

That XPLAIN uses at90usb1287, I'm talking about XPLAIN with 32uc3b1256 as its usb controller.


As of early this week LUFA can now run on the AVR32 UC3A0, UC3A1, UC3A3, UC3A4, UC3B0 and UC3B1 series microcontrollers, but I've still got a lot of porting work left to do - specifically, I need to fix up the bajillion endianness assumptions I've made when working with serialized structs, and I need to add the correct packing attribute where it is needed.

That means my firmware does not currently run on the new XPLAIN-A1 board, but it's not too far off.

Quote:

I asked the programmer owner and he told about a "connection fail" (or "fail connection"?) message from AVRStudio.


Hmm, I can't see how that could affect the firmware - if the programming window pops up, then the firmware is alive enough to perform USB and V2 protocol processing duties, so it can't be too dead. Reloading the firmware via an external programmer would reset the EEPROM and thus the reset line polarity parameter, but that's not done when reprogramming through FLIP.

- Dean Twisted Evil

EDIT: Hmm, that begs the question, where's the AVR32 UC3A2?

_________________
Atmel Studio 6.1 is now released, grab it here.
Report AS6/ASF bugs here.
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
golubev
PostPosted: Mar 16, 2011 - 12:38 AM
Newbie


Joined: Mar 04, 2011
Posts: 17


Thanks for the light, can't wait to see it running on the new xplain-a1 Smile
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits