How to set fuse with atprogram.exe

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

Hello,

 

I know my question sounds stupid, but I have there a Problem to Setup the fuse in the rigth way without stop the Interface working.

 

I use the AVRISPmk2 and can read back the fuse with the command:

 

atprogram.exe -t avrispmk2 -i isp -d ATmega16 -cl 100000 read --fuses

The answer would be:

Firmware check OK

:02000000811F5E

:00000001FF

 

The FUSE should be set to 0x1F and 0x81 which I can see in the answer but with an Overhead which is not really descript in a docu.

 

My Problem is that I can write the fuse to the value 0x1F and 0x99 but then the ISP Interface is broken...

 

With this change I go from 1MHz RC inside to a ext. lower Crystal with 4MHz.

I have use the command:

atprogram.exe" -t avrispmk2 -i isp -d atmega16 -cl 100000 chiperase write -fs --verify --values 991F

The answer is:

Firmware check OK

Chiperase completed successfully

Verification of write OK

Write completed successfully.

 

But after this I'm unable to use the ISP Interface anymore. I have Switch to an Atmel ICE with JTAG and can read that the fuses are set in the rigth way, but the ISP don't work anymore. When I set back the fuse to internal RC the ISP Interface is working without a Problem.

I can't reach the device by ISP anymore and the atprogram tell me that there is a Problem.

 

Firmware check OK
[ERROR] Could not establish connection to device. Please check input parameters, hardware connections, security bit, target power, and clock values.
Failed to enter programming mode. ispEnterProgMode: Error status received: Got 0xc0, expected 0x00 (Command has failed to execute on the tool). (TCF Error code: 1)

 

Do you have there some idea's or a bugfix?

 

This topic has a solution.
Last Edited: Mon. Nov 13, 2017 - 10:00 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ISP requires cpu clock.
Is the 4MHz crystal oscillating normally?

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

Yes, the Crystal is working fine. I have checked it with the oszilloscope. It looks like that only the ISP Interface is disabled.

But the Fuse I can read with the JTAG told me, that the ISP should be enabled.

 

Now I have two AVR's with this Problem.

 

The AVR work's fine with the Atmel Studio and the ISP Interface, with the RC inside and the Crystal, but after I have set the Fuse once with the atprogram.exe

I have the Problem that the ISP work's only with the inside RC and not with the Crystal.

The Crystal is running on both AVR's ...

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

what happens if you set the fuses to 3F 99

 

 

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Problem is solved now.

 

The STK500.exe use the "HighFuse" "LowFuse" combination.

The Atprogram.exe use the "LowFuse" "HighFuse" combination.

 

Thanks for your help