Error when writing EEPROM (atmega328pb, usbtiny)

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

Hi all,

 

I'm having an issue with writing the EEPROM on an atmega328pb. I'm using a USBtiny.

 

I can write to the flash memory with no issues. However, when I try to write the EEPROM, I get the following:

 

avrdude -patmega328pb -cusbtiny -Ueeprom:w:application.eep 

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9516 (probably m328pb)
avrdude: reading input file "application.eep"
avrdude: input file application.eep auto detected as Intel Hex
avrdude: writing eeprom (205 bytes):

Writing | ##########################                         | 51% 20.81s
avrdude: error: usbtiny_send: error sending control message: Connection timed out (expected 128, got -110)
Writing | ################################################## | 100% 22.12s

avrdude: 205 bytes of eeprom written
avrdude: verifying eeprom memory against application.eep:
avrdude: load data eeprom data from input file application.eep:
avrdude: input file application.eep auto detected as Intel Hex
avrdude: input file application.eep contains 205 bytes
avrdude: reading on-chip eeprom data:

Reading | ################################################## | 100% 5.37s

avrdude: verifying ...
avrdude: 205 bytes of eeprom verified

avrdude: safemode: Fuses OK (E:FF, H:DE, L:CE)

avrdude done.  Thank you.

Consistently, at 50% or 51% complete, an error occurs. The second progress "Writing" bar that goes to 100% fills almost immediately, as does the "Reading" progress bar.

 

Other information:

  • The EESAVE fuse is not programmed, I don't believe this affects the writing of the EEPROM itself?
  • Using avrdude to dump the EEPROM suggests that it has actually been written successfully.
  • I'm using avrdude version 6.3

 

Despite an apparently successful write, I'm concerned there might be issues I'm not aware of, and in general I'd like my tools and processes to be error free!

 

Can anyone offer any suggestions or advice?

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

Is USBtiny use USBASP firmware?

 

From:

usbtiny_send: error sending control message: Connection timed out (expected 128, got -110)

Your USBtiny didn't send back the return value as AVRDUDE expected.

Usually because writing EEPROM needs more time than flash. So the return value was not sent between the connection time wait.

The EEPROM content were verified and it passed so it's return value problem.

 

 

 

 

 

MG

 

I don't know why I'm still doing this hobby

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

So this would be classed an an avrdude bug? It should have a longer timeout when performing EEPROM writes?

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

Have you try reducing ISP clock?

MG

I don't know why I'm still doing this hobby