[SOLVED]: xboot problem on xmega32a4

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello,

I'm still in trouble using xboot and xmega32a4.

With xmega64a3 it works fine, but with xmega32a4 the programming is correct only the first time. Changing something in my own code and reprogram using xboot leads to a mismatch error in the memory cells changed.

I double checked the bootloader was programmed starting from 0x8000 (in byte). I read the actual contents of the flash and it is there.

Anyone used xboot on xmega32a4?
What do you recommend to find out the cause of the problem?

This is my fuses configuration:

	FUSE SETTINGS
	-------------	
	
	FUSEBYTE0 = 0xFF
	FUSEBYTE1 = 0x77
	FUSEBYTE2 = 0xBF
	FUSEBYTE4 = 0xF2
	FUSEBYTE5 = 0xDA

	JTAGUSERID = 0xFF
	WDPD = 1KCLK
	WDP = 1KCLK
	DVSDON = 0
	BOOTRST = BOOTLDR
	BODPD = DISABLED
	RSTDISBL = 0
	SUT = 64MS
	WDLOCK = 0
	BODACT = INSAMPLEDMODE
	EESAVE = 0
	BODLVL = 2V9

Thank you very much

Last Edited: Wed. Jul 6, 2011 - 07:17 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, in theory XBoot has been tested on X32a4's.

Your description makes it sound like XBoot forgot to erase the chip prior to (re)programming it.

Perhaps an eMail to Alex would answer your question.

Disclaimer: I've not used XBoot.

It is hard to beat an AVRISP mkII for $34 USD for development work with the Xmegas.

JC

AVR-XBoot

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Your description makes it sound like XBoot forgot to erase the chip prior to (re)programming it.

uhm, it forgot to erase the chip only for xmega32a4?
Anyway, I will give a try in that direction.

Quote:

It is hard to beat an AVRISP mkII for $34 USD for development work with the Xmegas.

I have the AVRISP mkII and also the AVRONE.
But they aren't an alternative in many cases.

Currently I'm working with a system composed of 12 boards connected with rs485. They are installed into a inaccessible site.

How to reprogram the avr without a bootloader?

EDIT:

I tried to perform a chip erase (avrdude -e) before next reprogramming (with fw changed) but the error was still there.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, there was a bug in one version of xboot in relation to the application section erase. ATMEL's self programming driver code had a bug in it for the erase application section command. It has since been fixed and confirmed to work on an xmega16a4. The latest code in the github repository also has a small adjustment to erase each page before writing it, making an application section erase unnecessary. I would suggest downloading the latest code from either https://github.com/alexforencich/xboot/tarball/master or https://github.com/alexforencich/xboot/zipball/master and trying it again. If it still doesn't work, then there is something very strange going on.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Great!

With the latest code it seems to work very fine! Now I'm able to reprogram correctly my xmega32a4.

btw, I changed the code to support rs485. If you're interested I'll happy to provide you the changes I've made.

Thanks again

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Looks like there have been a few people who need RS485 support. Are you familiar with git? If so, send a patch my way (alex at alexforencich dot com) and I will incorporate it. If you go the patch route, make sure it's done in such a way that it can be completely configured and completely removed just by modifying xboot.h. If you don't want to submit a patch, just post the changes you made and I will add them to the xboot source.