Set fuse in code

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

Hello,

I've got a project using several XMEGA-A1, programmed by a bootloader, using SPI.
I used sp_driver.h, from AN1605 to create a custom bootloader, and it's working perfectly.

Now, I would like to configure a brown out reset (this can be done with fuses bits). I know how to do this using JTAGICE, but I would like to set the fuses in one single step, trough my bootloader (instead of using PDI/JTAG on each XMEGA).
Is there a way to do this ? sp_driver.h provide a SP_ReadFuseByte function, but no SP_WriteFuseByte, so I bet it's not possible, but may be there's another way ?

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

Tiny and Mega had no method for fuses to be set from software - has that changed in Xmega then?

(for tiny/mega this was always the drawback of using a bootloader - for fuse changes you HAD to use JTAG or ISP).

EDIT: just found this in the Xmega-A manual:

Quote:
A separate memory section contains the Fuse bytes. These are used for setting important system functions, and write access is only possible from an external programmer.

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

OK, thanks, I missed that in the datasheet, I'll use JTAGICE.
Watchdog can be configure either by fuses or by software, and it's a shame we can't do the same with BOD.