Should fuses be set first during in-system programming?

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

I'm having some trouble bringing up a new ATTiny841 board, so I'm trying to think of everything I might be doing wrong.  One thing that comes to mind is the order in which I program the CPU.  I'm using an external, 16 MHz crystal, so I'm wondering if I should program the fuse for that first and then download my .ELF, or the other way around, or does the order even matter?  Thanks.

 

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

If it is a single board,  it does not make much difference.   i.e. program 8kB @ 200kHz and then set the fuses @ 200kHz.

Or set the fuses @ 200kHz and program 8kB @ 4MHz.

 

If you were programming 1000 boards,  you would choose the faster method.

 

David.

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

can it be that your actual programming speed is too high?

At work we have a couple of ISP MK II programmers that circulate and every now and then a couple of colleagues change the programming speed as they are working with large controllers at high speed, so when I then use a new chip to check the programming I get errors....

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

Sometimes the order matters. Need to remember that after flashing the code, the execution is started immediately. In a rare case that, for the board's functionality

the clock _has_ to be correct (due to poor design, for example), then need to set the clock fuses first.

 

First check that the programming frequency is enough low (set to 100kHz for being sure). Second, check that the programming signals are wired correctly.

Third, check that no peripheral is using the MISO line.