Strange fuse settings on ATmega324P

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

I have multiple boards with an ATMEGA324P20AU that is programmed on-board via SPI. The cpus are all marked as "ATMEGA324P20AU 1038G".

When I tried to connect with avrdude there was no response, even with a low clock rate. After a lot of experimenting I found out that with an external 250kHz clock on XTAL1 avrdude works fine. When I read the fuse settings, I got E=0xFF, H=0x99, L=0xe1 as factory settings. According to the data sheet, that would be CKSEL=0001 / reserved !?? The cpu has **never** been touched/programmed before that. I thought that there might be a problem with just this cpu. I tried 10 different boards, and all of them showed the same fuse settings. With the external clock connection, I'm able to program the fuses so that a 12MHz crystal is used in full swing mode, and the cpu works as expected.

Some time ago, I have used the same boards from a different production run with ATMEGA324PA-AU, and I have never seen such a problem. I was always able to program the cpu with avrdude without using an external clock connection. Shouldn't the default (factory) fuse settings use the internal RC oscillator? Has anybody seen something like that?

 

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

The 1st question would be:Where did you buy the chips from? wink

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

js wrote:

The 1st question would be:Where did you buy the chips from? wink

 

the board house in china (shenzen) where the boards were produced procured the chips.

 

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

Connect an external clock.   Read the fuses, lock bits and Flash memory.

 

I can believe that some assembly houses buy in pre-programmed AVRs.    If they become "surplus" to requirements,   they could be sold off cheap.

 

David.

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

david.prentice wrote:

Connect an external clock.   Read the fuses, lock bits and Flash memory.

 

I can believe that some assembly houses buy in pre-programmed AVRs.    If they become "surplus" to requirements,   they could be sold off cheap.

 

David.

 

just tried that:

the lock byte is 0x3f (read with avrdude ... -U lock:r:-h), meaning everything unlocked.

When I try to read the flash (avrdude ... -U flash:r:flash.bin:r) I'm getting a file with 0 bytes!?

The eeprom is 1KB with all FF's.

 

 

 

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

When I try to read the flash (avrdude ... -U flash:r:flash.bin:r) I'm getting a file with 0 bytes!?

avrdude will omit trailing 0xFFFF words, because they indicate erased ('empty') flash.  If you have a 0-byte file, it just means that flash is all 0xFFFF i.e. erased.

"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."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

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

"Fast.  Cheap.  Good.  Pick two."

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