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
alancarr
PostPosted: Jan 30, 2010 - 05:47 AM
Rookie


Joined: May 27, 2007
Posts: 39
Location: Portland, OR

hmm... well I built the newest version, but it doesn't seem to work for me. It won't read the signature or anything, acts like its connected wrong. Went back to the version from this thread and it works ok. There is a high liklihood that I'm doing something wrong, but it built so I'm not sure what.

I finally realized that since I don't need the jtag header I can just use a jumper to reset instead of unplugging each time. So its been downgraded to a minor inconvenience anyway.
 
 View user's profile Send private message  
Reply with quote Back to top
abcminiuser
PostPosted: Jan 30, 2010 - 07:26 AM
Moderator


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

Quote:

hmm... well I built the newest version, but it doesn't seem to work for me. It won't read the signature or anything, acts like its connected wrong. Went back to the version from this thread and it works ok. There is a high liklihood that I'm doing something wrong, but it built so I'm not sure what.


Were you building the AVRISP-MKII project, or the XPLAIN bridge project? The latter has the dual mode functionality, with the jumper to switch between them, and will work out of the box for the XPLAIN. If you just want the programmer, you will need to edit the AVRISP-MKII project makefile so that it uses "BOARD = XPLAIN" instead of "BOARD = USBKEY" 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
alancarr
PostPosted: Jan 31, 2010 - 01:03 AM
Rookie


Joined: May 27, 2007
Posts: 39
Location: Portland, OR

I tried the Xplain bridge project first. After reading your post I went back and tried the isp-mkii project with the change you mentioned in your post. So far still no luck. I'm able to compile it, and program the xplain and it shows up as an avrisp-mkii, but it throws the error like its hooked up wrong if I try programming or reading the signature.
 
 View user's profile Send private message  
Reply with quote Back to top
abcminiuser
PostPosted: Jan 31, 2010 - 03:20 AM
Moderator


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

A dumb question - are you selecting the correct device from AVRStudio? You should select "atxmega128a1" from the device list once you've connected to the AVRISP-MKII clone, and the "programming interface" should read "PDI".

- 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
alancarr
PostPosted: Jan 31, 2010 - 08:41 AM
Rookie


Joined: May 27, 2007
Posts: 39
Location: Portland, OR

Yup, double checked that. Like I said the hex file attached to this thread is working great, other than it doesn't reset the target.

I downloaded the 091223 version and tried building it and it didn't work for me either, so its gotta be something I'm doing wrong, but I'm not sure what since it seems to build ok, the hex just doesn't work right. I tried winavr 20090313 as well as 20100110 to see if the new winavr was the problem, I don't think so.

I think for now I'm going to see if I can get it to build in avr studio, this is the first time I've used programmers notepad so I'm probably missing something simple.
 
 View user's profile Send private message  
Reply with quote Back to top
abcminiuser
PostPosted: Jan 31, 2010 - 12:29 PM
Moderator


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

Whoops-a-diddly! The code was indeed broken. With PDI, two lines of the AVR are used, /RESET and the Test Access pin. To enable PDI, I need to pull /RESET low for 90nS, and then toggle the test pin 14 times within 100uS. While fixing the reset-release issue, I changed over the code to use a call to delay_ms(1), which violated the timing requirements.

It's fixed in the SVN now, but you can just change the calls to _delay_ms(1) in XPROGTarget_EnableTargetPDI() with delay_us(1) to fix it.

Sorry about the hassle!

- 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
MBedder
PostPosted: Jan 31, 2010 - 12:42 PM
Raving lunatic


Joined: Nov 02, 2009
Posts: 3239
Location: Zelenograd, Russia

Dean,

Could you kindly attach the latest XPlain combo .hex to your post?

Thanks.
 
 View user's profile Send private message  
Reply with quote Back to top
abcminiuser
PostPosted: Jan 31, 2010 - 12:53 PM
Moderator


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

No problem - I've updated my original post with the latest firmware, tested on my virgin XPLAIN board.

- 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
MBedder
PostPosted: Jan 31, 2010 - 01:25 PM
Raving lunatic


Joined: Nov 02, 2009
Posts: 3239
Location: Zelenograd, Russia

Thanks a lot Dean!
 
 View user's profile Send private message  
Reply with quote Back to top
shaack
PostPosted: Jan 31, 2010 - 02:33 PM
Newbie


Joined: Jan 31, 2010
Posts: 3


Great Work, now makes my XPLAIN board to be usable!
Using the hex files you posted...
But the same problems like alancarr above when trying to build the XPLAIN project out of the svn archive (updated last Friday, 28/1/2010). "It won't read the signature or anything, acts like its connected wrong"
 
 View user's profile Send private message  
Reply with quote Back to top
abcminiuser
PostPosted: Jan 31, 2010 - 02:52 PM
Moderator


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

Yes, you need to grab the absolute latest SVN revision, which I updated only an hour or two ago with the corrected code.

Glad you're finding it useful!

- 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
MBedder
PostPosted: Jan 31, 2010 - 03:30 PM
Raving lunatic


Joined: Nov 02, 2009
Posts: 3239
Location: Zelenograd, Russia

Is it still possible to use a Flip to (re)load the new HEX to the XPlain's 90USB1287 after the combo HEX has been succesfully loaded via external JTAG programmer?

I tried but the bootloader doesn't seem to get activated when the TCK pin is being grounded [as XPlain manual suggests] and USB cable reconnected.

_________________
Warning: Grumpy Old Chuff. Reading this post may severely damage your mental health.
 
 View user's profile Send private message  
Reply with quote Back to top
shaack
PostPosted: Jan 31, 2010 - 04:13 PM
Newbie


Joined: Jan 31, 2010
Posts: 3


abcminiuser wrote:
Yes, you need to grab the absolute latest SVN revision, which I updated only an hour or two ago with the corrected code.

Yep, works Smile

Two more questions (not only to Dean Wink
1. what about making the XPLAIN board to a "true" clone, i.e. make it possible to use it to flash/debug other boards/devices?
2. did anybody happen to get the "drum" example sources with which the XPLAIN board is shipped?
 
 View user's profile Send private message  
Reply with quote Back to top
shaack
PostPosted: Jan 31, 2010 - 04:50 PM
Newbie


Joined: Jan 31, 2010
Posts: 3


MBedder wrote:

I tried but the bootloader doesn't seem to get activated when the TCK pin is being grounded [as XPlain manual suggests] and USB cable reconnected.

You need to manually pull the reset pin (pin 6) of J200 to ground after powering up with TCK grounded. That's at least what I experienced and I think has been posted earlier as well.
 
 View user's profile Send private message  
Reply with quote Back to top
MBedder
PostPosted: Jan 31, 2010 - 05:07 PM
Raving lunatic


Joined: Nov 02, 2009
Posts: 3239
Location: Zelenograd, Russia

That's the same as reconnecting the XPlain USB - doesn't work.

_________________
Warning: Grumpy Old Chuff. Reading this post may severely damage your mental health.
 
 View user's profile Send private message  
Reply with quote Back to top
alancarr
PostPosted: Jan 31, 2010 - 06:12 PM
Rookie


Joined: May 27, 2007
Posts: 39
Location: Portland, OR

Awesome it works!! Just downloaded the newest version built it and loaded it on my Xplain. Programming works, and it resets the target!

Thanks for all your work on this Dean!
 
 View user's profile Send private message  
Reply with quote Back to top
ArnoldB
PostPosted: Jan 31, 2010 - 06:19 PM
Raving lunatic


Joined: Nov 29, 2007
Posts: 3219


MBedder wrote:
That's the same as reconnecting the XPlain USB - doesn't work.
For reasons no one can explain, it isn't the same.

TCK to GND, and reconnecting USB
=> No bootloader

TCK to GND, board powered via USB, /RESET shortened to GND, and opened
=> bootloader

For lack of any real idea I blame a power glitch, power-up sequencing or the phase of the moon.
 
 View user's profile Send private message  
Reply with quote Back to top
MBedder
PostPosted: Jan 31, 2010 - 07:49 PM
Raving lunatic


Joined: Nov 02, 2009
Posts: 3239
Location: Zelenograd, Russia

Nope. My both XPlain's still enumerate as an mkII if TDI is grounded or as a serial port if not - the TCK grounded + Reset pulsed low still doesn't activate the bootloader.

Could anyone read and post the XPlain's 90USB1287 fuse settings?
 
 View user's profile Send private message  
Reply with quote Back to top
abcminiuser
PostPosted: Jan 31, 2010 - 11:05 PM
Moderator


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

Quote:

Is it still possible to use a Flip to (re)load the new HEX to the XPlain's 90USB1287 after the combo HEX has been succesfully loaded via external JTAG programmer?


By using an external hardware programmer, you've wipe the DFU bootloader. You can get it back by using your JTAG to load the DFU bootloader HEX from the Atmel website, or after compiling my open source DFU bootloader from LUFA.

Quote:

1. what about making the XPLAIN board to a "true" clone, i.e. make it possible to use it to flash/debug other boards/devices?


The XPLAINBridge code shares code with my AVRISP-MKII project (see here) with a few compile time options to remove the ISP programming support. If I added support for bit-banged SPI (I'll put that on my TODO) it would be possible to load the full firmware onto the XPLAIN and use the JTAG pins for SPI, PDI and TPI programming of other devices.

- 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
MBedder
PostPosted: Jan 31, 2010 - 11:37 PM
Raving lunatic


Joined: Nov 02, 2009
Posts: 3239
Location: Zelenograd, Russia

Thanks, after JTAGing Very Happy the DFU bootloader and FLIPping your HEX everything is working fine. The DFU is accessible only after a hardware reset as others said.

_________________
Warning: Grumpy Old Chuff. Reading this post may severely damage your mental health.
 
 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