Penrose AVR programming

edited March 2015 in Troubleshooting
I'm having issues flashing my ATMEGA128p with the boot loader for Penrose. 

I found the fuse settings somewhere, but now I'm trying to double check, I can't find them.  Anyway, I had successfully set the fuses like this:

avrdude -v -V -p atmega168 -cstk500v1 -P/dev/tty.usbmodem1431 -b19200 -e -U lfuse:w:0xff:m -U hfuse:w:0xd4:m -U efuse:w:0x02:m

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.05s

avrdude: Device signature = 0x1e9406
avrdude: safemode: lfuse reads as 62
avrdude: safemode: hfuse reads as DF
avrdude: safemode: efuse reads as 1
avrdude: erasing chip
avrdude: reading input file "0xff"
avrdude: writing lfuse (1 bytes):

Writing | ################################################## | 100% 0.06s

avrdude: 1 bytes of lfuse written
avrdude: reading input file "0xd4"
avrdude: writing hfuse (1 bytes):

Writing | ################################################## | 100% 0.06s

avrdude: 1 bytes of hfuse written
avrdude: reading input file "0x02"
avrdude: writing efuse (1 bytes):

Writing | ################################################## | 100% 0.06s

avrdude: 1 bytes of efuse written

avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as D4
avrdude: safemode: efuse reads as 2
avrdude: safemode: Fuses OK (H:02, E:D4, L:FF)

avrdude done.  Thank you.

Now when I try to put the boot loader on or even set the fuses again, I get:
avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.

I tried flashing one atmega in the Penrose, and another via an Arduino Uno.

Any ideas?  I noticed the BOM is an atmega128"P" which is what I have.  All very odd, I'm certainly not an avrdude virgin!

Comments

  • edited March 2015
    1. Penrose uses an ATMEGA168P not 128P
    2. Fuses should be High: 0xDF, Low: 0xE2, Extended: 0xFA
    Infos from here: https://github.com/SonicPotions/Penrose/tree/master/Bootloader

    Edit: after a closer look your Fuse settings for Low and High Fuse are the right settings:
    Low: 0xFF, High: 0xD4, Extended: 0xFA

    The Low Fuse setting 0xFF is the setting for an external crystal for a frequency >8.0 MHz, so best is to use the Penrose board for flashing (it must be powered).
  • Sorry I meant to say atmega168p !!  

    THANKS for the fuse info and link.  Now I will try to recover this chip!
  • Hmmm....this is where I saw the fuses being set: https://github.com/SonicPotions/Penrose/blob/master/bin/flashAvr.sh  so I guess this is incorrect?
  • edited March 2015
    Have you read my edited post? Your High Fuse and Low Fuse settings are right, not shure about the Extended Fuse setting.
  • Thanks @cj55 I see your edits now...
  • Success!  I put a 20Mhz crystal on the board I was using with the Arduino as a programmer, and it loaded the boot loader first time.

    It also worked with the other chip I used first (which hadn't previously worked in the Penrose  - my other avrprogrammer must have a bad cable or something).

    Thanks for the tips @cj55.
  • for the firmware I recommend the /bin folder
    https://github.com/SonicPotions/Penrose/tree/master/bin

    for one there is an amalgamated image that combines the bootloader and the firmware image into one hex file. Then there is also the flashAvr.sh bash script where you can find the avrDude fuse settings.
Sign In or Register to comment.