View previous topic :: View next topic |
Author |
Message |
olhexy
Joined: 03 Apr 2011 Posts: 192 Location: Tilburg, Netherlands
|
Posted: Mon Oct 14, 2019 2:21 pm Post subject: AVRISP mkii as PDI interface to XMEGA-A3BU Xplained |
|
|
Not a big project, but may be helpfull for others to start XMEGA.
As a follow up to https://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=viewtopic&t=14481 I made a nice adaptor cable with Dupont wires.
I bought a bunch of coloured Dupont wires, the type many people use on breadboard. I got with both ends female or both ends male.
But I did not have male-female wires. So I cut de male wires in half and had to crimp females on the other side.
After some training... the crimping went very well. If you buy a tool make sure that it can do the very small AWG 28.
I like the Dupont system. The plastic housing can be cut at size and you can glue housing parts very well together with cyanoacrylate glue to make almost every connector model.
You can remove/change wires from the housing. I use a small needle to lift the clip.
On the pictures you can see the numbers I put on AVRISP mkii. Red (MISO) on the cable is pin 1.
The same red goes to "DATA' on the XMEGA-A3BU Xplained. The PDI connections to be used are indicated on the back side of the Xplained board.
It is real funny that only 4 wires are to be used. Summery:
mkii (1=MISO) ........Red.......... A3BU (DATA)
mkii (2=VCC) .........Yellow....... A3BU (VCC)
mkii (3=SCK) ..not connected..
mkii (4=MOSI)..not connected..
mkii (5=RESET) ......Green ...... A3BU (CLK)
mkii (6=GND) .........Black........ A3BU (GND)
EDIT: On the back side of the XMEGA-A3BU Xplained board there is a message "CUT TO DISCONNECT JTAG TDO FROM PDI DATA". I did cut the track (also called "SMD-STRAP").
It is to avoid possible lock up situations. See note on page 3 of the schematics pdf in AN_8394 Source Code https://www.microchip.com/wwwAppNotes/AppNotes.aspx?appnote=en591951
I do not think those lock up situations apply in my case. MKii still works if I close the track by hand with some alu foil.
Last edited by olhexy on Wed Oct 16, 2019 12:41 pm; edited 3 times in total |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Tue Oct 15, 2019 1:08 pm Post subject: |
|
|
thanks for sharing. i use the same programmer for xmega
it also made me realize that these basic things are important to know when getting started. make sure to also read the ATXMEGA help topic in bascom-avr help file.
Most striking difference is the voltage which is not 5V any more. _________________ Mark |
|
Back to top |
|
|
olhexy
Joined: 03 Apr 2011 Posts: 192 Location: Tilburg, Netherlands
|
Posted: Mon Sep 04, 2023 6:14 pm Post subject: |
|
|
I picked up this board again.
I never got FLIP working, had it uninstalled, and then could not install it again, because "uninstall.exe"is missing.
But Windows says it is still there, so first thing is how to make Windows forget about it.
Solution: remove with "Control Panel" (the Dutch speaking have to know the translated name: "Configuratiescherm")
Now FLIP kan be installed from: https://www.microchip.com/en-us/development-tool/flip
Because it uses an older JRE you have to take FLIP 3.4.x for Windows (Java Runtime Environment included)
https://ww1.microchip.com/downloads/aemDocuments/documents/DEV/ProductDocuments/SoftwareTools/JRE-Flip-Installer-3.4.7.112.exe
The FLIP is on my computer again!
But it does not recognize the XMEGA-A3BU Xplained ("Could not open USB device")
But wait, the FLIP needs a bootloader? Viewing the contents with MKii it seems that there is not much inside. It seems that only a small program is there.
I bought this board second hand, so it is quite possible that boot loader was erased. I got it with a working demo program.
After a long search I finally found all boot loaders here: https://microchip.my.site.com/s/article/Pre-Programmed-USB-bootloader-for-Mega-Xmega-devices
DFU Bootloader hex files for Xmega USB devices can be download from the following link: http://www.atmel.com/images/AVR1916.zip
I will try to get that in the board and hopefully the FLIP may work.
FLIP works and connects with USB to the device after I installed the bootloader!
For the fuses I used this information from de AVR1916 documentation:
Thus, the fuses values are:
Fuse 0 = 0x00
Fuse 1 = 0x00
Fuse 2 = 0xBE
Fuse 4 = 0xFE
Fuse 5 = 0xEF
Lock byte = 0xFC
Before installing bootloader I had saved original demo program from chip as .hex with MKii; installed this then with FLIP and the demo works.
Last edited by olhexy on Tue Sep 05, 2023 9:09 am; edited 8 times in total |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Mon Sep 04, 2023 7:25 pm Post subject: |
|
|
i once in a while had a processor without bootloader. but usually it is locked and present. so check first the fuses and read the memory to see if it is there or not.
to use the BL, you need to put the micro in DFU mode. this is usually done by pressing 2 buttons. reset and hwb (or hbw). then release reset and you get into dfu mode.
then FLIP can find the boot loader. and bascom as well.
good luck! _________________ Mark |
|
Back to top |
|
|
olhexy
Joined: 03 Apr 2011 Posts: 192 Location: Tilburg, Netherlands
|
|
Back to top |
|
|
|