Eleven running slow

The "Eleven" is our Uno-equivalent Arduino-compatible board, but with a number of improvements including prototyping area, a mini-USB connector, LEDs mounted near the edge, and the D13 LED isolated using a FET. [Product page]
bhall
Posts: 4
Joined: Sat Mar 02, 2013 9:31 pm
Location: Sydney

Re: Eleven running slow

Post by bhall » Wed Mar 30, 2016 9:10 am

Hello!

I'm currently suspecting a similar issue - the problem is mainly around debouncing keys. They're very unresponsive.

Checking the fuse settings shows all three are set to 0.

I originally developed my gizmo using an Eleven v2.0, but am using a barebones Atmega328 chip for the actual implementation to save on space.

I'm programming the Atmega by placing it in the Eleven's socket. Nice and easy.

Despite all my attempts over the past few days, I've not been able to update the fuse settings to the standard Uno values. When I switched the original Freetrhonics-Supplied Atmega back in, it is exactly the same - all fuses are set to 0 ... ?

When trying to update the fuse setting (on either my own or the Freetronics-supplied chip):

Code: Select all

avrdude -v -patmega328p -carduino -P/dev/cu.usbmodem14731 -b115200 -U lfuse:w:0xff:m -F -U efuse:w:0x5:m -U hfuse:w:0xde:m
<snip>

Code: Select all

avrdude: Device signature = 0x1e950f
avrdude: safemode: lfuse reads as 0
avrdude: safemode: hfuse reads as 0
avrdude: safemode: efuse reads as 0
avrdude: reading input file "0xff"
avrdude: writing lfuse (1 bytes):

Writing |                                                    | 0% 0.00s ***failed;  
Writing | ################################################## | 100% 0.06s

avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xff:
avrdude: load data lfuse data from input file 0xff:
avrdude: input file 0xff contains 1 bytes
avrdude: reading on-chip lfuse data:

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

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
         0x00 != 0xff
avrdude: verification error; content mismatch

avrdude: safemode: lfuse reads as 0
avrdude: safemode: hfuse reads as 0
avrdude: safemode: efuse reads as 0
avrdude: safemode: lfuse changed! Was ff, and is now 0
Would you like this fuse to be changed back? [y/n] y
avrdude: stk500_cmd(): programmer is out of sync
(this was output using the Freetronics chip).

I've also tried re-burning the bootloader as suggested earlier but it also fails:

Code: Select all

avrdude: Version 6.0.1, compiled on Apr 14 2015 at 16:30:25
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf"
         User configuration file is "/Users/brett/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/cu.usbmodem14731
         Using Programmer              : stk500v1
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500 Version 1.x firmware
         Hardware Version: 3
         Firmware Version: 4.4
         Vtarget         : 0.3 V
         Varef           : 0.3 V
         Oscillator      : 28.800 kHz
         SCK period      : 3.3 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x000000 (retrying)

Error while burning bootloader.
Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.

Trying the AVRISP mk II programmer just gets timeouts ...

Code: Select all

avrdude -C/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -v -patmega328p -cstk500v2 -P/dev/cu.usbmodem14731 -e -Ulock:w:0x3F:m -Uefuse:w:0x05:m -Uhfuse:w:0xDE:m -Ulfuse:w:0xFF:m 

avrdude: Version 6.0.1, compiled on Dec 16 2013 at 17:26:24
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf"
         User configuration file is "/Users/brett/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/cu.usbmodem14731
         Using Programmer              : stk500v2
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : STK500V2
         Description     : Atmel STK500 Version 2.x firmware
         Programmer Model: Unknown
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout

(I've got both Arduino 1.6.7 installed and a separate installation of avrdude installed).

Any ideas? This debouncing thing is really driving me crazy ... I'm hoping it's simply because it's using a 1MHz clock instead of my external 16MHz ...

Thanks,

Brett.

bhall
Posts: 4
Joined: Sat Mar 02, 2013 9:31 pm
Location: Sydney

Re: Eleven running slow

Post by bhall » Fri Apr 01, 2016 7:32 pm

(no idea why my Mac is obsessed with autocorrecting "Freetronics" to Freetrhonics)

angusgr
Freetronics Staff
Freetronics Staff
Posts: 853
Joined: Tue Apr 09, 2013 11:19 pm
Location: Melbourne, Australia
Contact:

Re: Eleven running slow

Post by angusgr » Mon Apr 04, 2016 5:13 am

Hi bhall,

Sorry to hear your Eleven is misbehaving.

Regarding reading/writing fuses via the internal (serial) bootloader, unfortunately this isn't supported. The serial bootloader will always return 0 for fuse values, regardless of how they are set.

Regarding the AVR ISP MKii, try adding the command line option "-B 4" to your avrdude command, as described here:
http://www.freetronics.com.au/pages/usb ... d_new_avrs

This slows down the programmer's "bit clock" pulse, which is required if the fuses are incorrectly set and the clock rate is too low for the default bit clock.


Angus

bhall
Posts: 4
Joined: Sat Mar 02, 2013 9:31 pm
Location: Sydney

Re: Eleven running slow

Post by bhall » Thu Apr 07, 2016 7:51 am

Thanks for your reply Angus.

It's nice to have an explanation as to why I'm seeing those fuse bytes always zero.

Your ZIF and USBasp modules arrived this week so I was able to use them to burn the boot loader to the ATmega I'd bought on eBay - worked like a charm and I could see that the fuse bytes were correctly set.

Unfortunately, my buttons remain sluggish ... so it seems that I have to blame my haphazard code rather than a slow clock rate!

Thanks again,

Brett.

(BTW, never had a problem with the Eleven ... my breadboard prototype worked perfectly ... just having issues (no serial debugging output) now that I'm trialling the hardwired/veroboard version in a jiffy box)

User avatar
stryker
Posts: 270
Joined: Sat Jan 14, 2012 2:44 pm

Re: Eleven running slow

Post by stryker » Tue Jun 06, 2017 10:10 am

Another simple (& free) alternative GUI for avrdude is AVRDUDESS (http://zakkemble.co.uk/)

Post Reply