Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

xmega32E5 and programmer issue

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> AVR
View previous topic :: View next topic  
Author Message
krolikbest

Bascom Member



Joined: 02 Jan 2017
Posts: 112

poland.gif
PostPosted: Thu Apr 28, 2022 9:27 am    Post subject: xmega32E5 and programmer issue Reply with quote

Hello,
I recently purchased an xmega32e5. I have a programmer based on LUFA project (AVRISP mkII) supporting isp, pdi and tpi. However, on the seller's website this microcontroller is not listed as a supported chip. The last update of the LUFA project I have is LUFA151115.hex. My question, maybe there is (I can't find via google) a newer update that supports this chip? I will add that in Bascom using this programmer in ISP mode I have no problem detecting and programming atmegas while trying to detect a board with xmega32e5 (http://store.modulowo.com/pl/p/Xmega-eXploreE5-z-ATXmega32E5/358) I get

"stk500v2_disable(): failed to leave programming mode, got 0x01
Chip Device ID : 000006
:stk500v2_cmd(): failed to read signature
AVRISP MK2 detecteg
.
.
.
"
Some hints, ideas according to this programmer (https://www.sibit.pl/sklep/avr-prog-mkii.html).

Regards,
Martin
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5921
Location: Holland

blank.gif
PostPosted: Thu Apr 28, 2022 1:53 pm    Post subject: Reply with quote

in bascom , when using xmega, the PDI protocol is automatic used.
But of course the programmer must be able to support this.
stk500/600 protocol is used.
you could try using avrdude to see if it works.

_________________
Mark
Back to top
View user's profile Visit poster's website
krolikbest

Bascom Member



Joined: 02 Jan 2017
Posts: 112

poland.gif
PostPosted: Fri Apr 29, 2022 1:53 pm    Post subject: Reply with quote

First to be sure that this programmer works with avrdude I decided to connect it to the Arduino Uno via ISP interface, knowing that in Bascom I can use this programmer as a USBProg Programmer/AVR ISP mkII and there it works and can upload programs to the Uno, so I gave a try to communicate using avrdude 6.3 and I've written:

avrdude -p m328p -c avrisp2 -P usb

but I got as a respone:

avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_getsync(): timeout communicating with programmer

but using avrdude 5.11 I successfully read a signature. It seems that my programmer with LUFA project has a serious problem with avrdude >=6.01. I can't use downgraded version because I doesn't support xmega32e5. Abandon this programmer and buy something newer or there is some workaround according LUFA project. Maybe someone had similar problem?

Regards,
Martin
Back to top
View user's profile
krolikbest

Bascom Member



Joined: 02 Jan 2017
Posts: 112

poland.gif
PostPosted: Mon May 09, 2022 1:55 pm    Post subject: Reply with quote

After short vacation finally solution is found. If you have some programmer based on LUFA project the last firmware is from 2015 year for my programmer. I didn't find any newer but this one is ok. Next thing you have to do is to use avrdude that support x32e5 uC. This is in version 6.3 and higher but as I've written earlier - using avrdude6.3 with programmer with LUFA in my case ended up with
Code:
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_getsync(): timeout communicating with programmer

so I started to dig and search over internet looking for avrdude 6.3 capable to use with my programmer. In this thread (polish source)
https://www.elektroda.pl/rtvforum/topic3254564.html?sid=e93ab1c292a782ab3df6ff815fd2b4ee someone had similar problem. As an attachment you can find a special version of avrdude6.3 adapted to a programmer with LUFA project. Keep in mind that under windows 7,10,11 etc programmer is seen under Device Manager as a "libusb-win32 devices"->"AVRISP mkII".
Now I can read signature/ write program etc using avrdude.
And the most important-using Bascom I've not encountered any problems as well So case to close Smile

Regards,
Martin
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> AVR All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum