Getting locked out after setting fuse bits setting for ATMEGA8A-AU

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

I made a board with the QFN backage of ATMEGA8A-AU, which is the 32 pin module. There's a 16MHz crystal clock connected as well. Now, using the USBASP 2.0 and extremeburner, when I program its fuse to:

 

LOW: 0xFF

HIGH: 0xC9

 

because I'm using 16MHz crystal, it so happens that most of my boards become unreadable. I say most because in a couple of them it worked well. This issue did not happen during the development cycle, when I was using the DIP package ATMEGA8, my fuse setting worked well. Difference being I was setting the fuse using ATMEL-ICE programmer with SPI 6-pin connector. But that shouldn't make a difference, right?

 

The hardware guy says that soldering has been done properly and I don't see any issues in the schematic or the layout either. But I have not been able to make any headway with debugging this situation. I'd love your advice on this. Thank you!

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

This may help: http://www.avrfreaks.net/forum/t... It explains what can go wrong if you change fuses. Hopefully it's just the clock selection that has been set wrong and not something terminal like RSTDISBL.

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

The fuse settings seem right for your description, are there 22pf or smaller caps on each side of the xtal to ground?

Can you post a picture of your board with close up of the xtal area? 

How was the board put together, pick n place + reflow oven, or hand soldered?  A picture would be helpful.

 

Jim

 

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

lemonickous wrote:
The hardware guy says that soldering has been done properly ...

;)

 

Still, check the levels and buzz out all the pins.  Vcc and AVcc connected, and at proper levels?  All Gnd connected, and at proper levels?  Decoupling caps?  Make these and following checks RIGHT ON THE AVR PIN.

 

Next, look at the /RESET circuit.  Does it drop when you do a Read Signature operation?

 

So, you got to the unit once, to program and set the fuses.  And after that, you cannot make contact?  So then your clock source isn't working, right?  Check carefully the values of the load capacitors for the crystal.

 

If the crystal is in fact humming along OK, you should be able to get a readable signal on XTAL2 with a good 'scope probe.  What does that tell you?

 

To further narrow down to the clock circuit, you can inject a signal into XTAL1 as outlined in Cliff's link.

 

 

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

Fuse setting above, sets clkout, so should be able to see clock on an I/O pin( I don't have the data sheet handy, but easy to look that up).

 

Jim

 

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

lemonickous wrote:
I made a board with the QFN backage of ATMEGA8A-AU, which is the 32 pin module.

???  Is the package TQFP as the part number indicates, or really QFN?

 

 

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

ki0bk wrote:

The fuse settings seem right for your description, are there 22pf or smaller caps on each side of the xtal to ground?

Can you post a picture of your board with close up of the xtal area? 

How was the board put together, pick n place + reflow oven, or hand soldered?  A picture would be helpful.

 

Jim

 

It was hand soldered. They used a blower for the MCU with temperature 350F to solder the TQFP chip (I'm sorry for using the wrong package, i.e. QFN at first). Here's the schematic (relevant portion) and a photo of the PCB:

 

 

 

I know the placement is not so great, but I've just joined the project and have to do with what is. However, it shouldn't matter in this particular case, yes?

 

theusch wrote:

;)

 

Still, check the levels and buzz out all the pins.  Vcc and AVcc connected, and at proper levels?  All Gnd connected, and at proper levels?  Decoupling caps?  Make these and following checks RIGHT ON THE AVR PIN.

 

Next, look at the /RESET circuit.  Does it drop when you do a Read Signature operation?

 

So, you got to the unit once, to program and set the fuses.  And after that, you cannot make contact?  So then your clock source isn't working, right?  Check carefully the values of the load capacitors for the crystal.

 

If the crystal is in fact humming along OK, you should be able to get a readable signal on XTAL2 with a good 'scope probe.  What does that tell you?

 

To further narrow down to the clock circuit, you can inject a signal into XTAL1 as outlined in Cliff's link.

 

Yeah, those were the first things I probed. I cannot read either the fuses or the flash anymore. The key thing is that it's not happening for all my boards, but for most. There's obviously no hardware difference between all of them, which is why the first thing I wondered was whether while soldering, the IC overheated. But this can't be the case either, because initially I'm able to read the fuse and program the flash. It's just after setting the fuses that everything goes kaput.

The capacitors connected are 12pF

I sadly have only a 20MHz oscilloscope, a Hantek 6022BE (it connects to the computer through USB, to display signal on screen). So I can't see a signal more than 10MHz properly. XTAL2 just shows me a 2.7V roughly straight line (in both working and bricked PCBs). So can't make anything from it.

Reset pin is indeed going to 0 while read operation on both working and bricked PCBs.

 

I'll try the XTAL1 injection soon. Thank you!

 

Quote:

Fuse setting above, sets clkout, so should be able to see clock on an I/O pin( I don't have the data sheet handy, but easy to look that up).

Yes, I'll try this, first flash the code, then set the fuse so at least I'll get CLKOUT. Thanks

 

Quote:

???  Is the package TQFP as the part number indicates, or really QFN?

Yes, sorry TQFP is correct.

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

The soldering of the mpu looks fine, and hand soldering with hot air reflow gun is how I do that myself.

Is the xtal used there a surface mount or through hole version?  check its soldering.

12 pf cap may be a bit small, can they be replace with 20pf, or alternatively, stack another 12pf on top of existing cap to make it 24pf, just to test.

 

Jim

 

 

 

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

lemonickous wrote:

I sadly have only a 20MHz oscilloscope, a Hantek 6022BE (it connects to the computer through USB, to display signal on screen). So I can't see a signal more than 10MHz properly.

 

Hmmm, a 20MHz scope will display a 16MHz signal just fine, it will just be a couple of dB down.

 

According to the manual the 6022BE samples at 40MHz and has a 20MHz bandwidth (ie -3dB point).

'This forum helps those who help themselves.'

 

pragmatic  adjective dealing with things sensibly and realistically in a way that is based on practical rather than theoretical consideration.

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

You should be able to see something on XTAL2 pin. Always use the x10 probe when reading sensitive test points.

David.

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

Is that schematic accurate?  One of the GND pins (pin 21) isn't connected.

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

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

kl0bk wrote:

The soldering of the mpu looks fine, and hand soldering with hot air reflow gun is how I do that myself.

Is the xtal used there a surface mount or through hole version?  check its soldering.

12 pf cap may be a bit small, can they be replace with 20pf, or alternatively, stack another 12pf on top of existing cap to make it 24pf, just to test.

 

Jim

So in 2 of the boards, I solved the problem by resoldering the crystal myself. Caps are ok, 12-22pF is what's specified in the datasheet, so 12 should work.

 

Brian wrote:

Hmmm, a 20MHz scope will display a 16MHz signal just fine, it will just be a couple of dB down.

 

According to the manual the 6022BE samples at 40MHz and has a 20MHz bandwidth (ie -3dB point).

Ok, I misremembered it as 20MHz sampling, so that was my problem. I got a good signal on the ones that are working.

David wrote:

You should be able to see something on XTAL2 pin. Always use the x10 probe when reading sensitive test points.

Yeah, I got the signal. Thanks David

joey wrote:

Is that schematic accurate?  One of the GND pins (pin 21) isn't connected.

Yes, elsewhere on the circuit, that ground net has been connected to the symbol. I only pasted a part of the schematic here.

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

Slap the guy who did the layout! All those fills on the top not tied to the ground plane. Are the caps actually connected to 0V?

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

12-22pF is what's specified in the datasheet, so 12 should work

The datasheet gives you a range, yes.  The specific value you need will depend upon the specs of your crystal, XTAL1/2 pin capacitance, trace capacitance, etc.  Layout is critical.  Moreover, 12 is at the edge of spec, so if other aspects of the design are also on the edge, the oscillator may not be stable, or the crystal might not sing at all.

 

Without doing the proper engineering work, it's generally better to chose a component value in the >>middle<< of the specified range, rather than on the very edge.  Much more likely to work in a wider range of circumstances.  For that reason, 18 pF is often chosen as a starting point.

 

Glad that you've started to solve the problem by re-soldering the crystal.  Did you identify the underlying issue?  Was it a short?  A break?  Flux residue?  Something else?

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

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

joeymorin wrote:
Glad that you've started to solve the problem by re-soldering the crystal. Did you identify the underlying issue?
lemonickous wrote:
The hardware guy says that soldering has been done properly...

devil

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.