Edit: Probably solved
- I can successfully change the fuse bits in the GUI.
I know this because I can read the values of the fuse bits of the chip. I can change them, then read them later, and they are the same as when I wrote them
- I know the values that each bit is supposed to be.
I know this because the GUI has a button to copy to clipboard. This is what is copied to my clipboard...
ADC0_BIASCOMP = 0x07
ADC0_BIASREFBUF = 0x07
ADC0_BIASR2R = 0x07
ADC1_BIASCOMP = 0x07
ADC1_BIASREFBUF = 0x07
ADC1_BIASR2R = 0x07
USB_TRANSN = 0x09
USB_TRANSP = 0x19
USB_TRIM = 0x06
ROOM_TEMP_VAL_INT = 0x1E
ROOM_TEMP_VAL_DEC = 0x00
HOT_TEMP_VAL_INT = 0x68
HOT_TEMP_VAL_DEC = 0x09
ROOM_INT1V_VAL = 0xFF
HOT_INT1V_VAL = 0xFF
ROOM_ADC_VAL_PTAT = 0xAE8
HOT_ADC_VAL_PTAT = 0xD96
ROOM_ADC_VAL_CTAT = 0xB6B
HOT_ADC_VAL_CTAT = 0x949
BOD33_DIS = [ ]
BOD33USERLEVEL = 0x2A
BOD33_ACTION = RESET
BOD33_HYST = 0x0A
NVMCTRL_BOOTPROT = 0
NVMCTRL_SEESBLK = 0x00
NVMCTRL_SEEPSZ = 0x00
RAMECC_ECCDIS = [X]
WDT_ENABLE = [X]
WDT_ALWAYSON = [ ]
WDT_PER = CYC4096
WDT_WINDOW = CYC8
WDT_EWOFFSET = CYC8
WDT_WEN = [ ]
NVMCTRL_REGION_LOCKS = 0x12345678
SW0_WORD_0 = 0x1FF07FD (modified)
SW0_WORD_1 = 0x1B29 (unknown)
TEMP_LOG_WORD_0 = 0xFF96801E (unknown)
TEMP_LOG_WORD_1 = 0xD96AE8FF (unknown)
TEMP_LOG_WORD_2 = 0xFF949B6B (unknown)
USER_WORD_0 = 0xFE9AD254 (valid)
USER_WORD_1 = 0x8025FF80 (valid)
USER_WORD_2 = 0x12345678 (valid)
- I can successfully erase the chip.
I know this because I can read the chip and they are all zeroes after I erase it.
- I can "successfully" change the fuse bits.
Following the documentation on atmel's website, the template is atprogram -t <tool> -i <interface> -d <device> write -fs --values <fuse value>
and the example is atprogram –t avrdragon –i pdi –d atxmega16A4 write –fs --values 4200ff00feef
. I have a atsame54p19a device, using a samice tool with a swd interface. For the "fuse value" I thought I should just concatenate the values from "SW0_WORD_0" to "USER_WORD_2" together to create the line atprogram --tool samice -i swd -d atsame54p19a write -fs --values 01FF07FD00001B29FF96801ED96AE8FFFF949B6BFE9AD2548025FF80eeeeeeee
Then it says Write completed successfully.
But when I read the fuse bytes, they have not changed.
I have little to no experience with this. I normally use arduino for hobbies and stuff, but this is to help out a coworker
So to specifically ask a question,
How do I change the fuse bits?
Do I not understand how to create the payload for values?
Is there some common problem that I have succumbed to?
Any help would be appreciated, thank you!
Google hasnt been very helpfull (more like I havent been using it correctly probably). My prediction is that I am writing it to the wrong place or wrong way or something, IDK.
Edit: I think I needed to give an offset. I needed to add -o <address>
to make atprogram --tool samice -i swd -d atsame54p19a -f write -o 0x804000 -fs --values 54d29afe80ff258012345678