Show Posts
Pages: 1 ... 205 206 [207] 208 209 ... 233
3091  Forum 2005-2010 (read only) / Troubleshooting / Re: Strange AVRIspmkii issue on: April 29, 2010, 11:19:25 am
Hi Eberhard,

thanks for the hints. I have to AVRispmkII here. Let's call them 6 and 10. 6 has a 6 pin connector and 10 has a 10 pin connector. In the past I used most often 10 because the target had a 10 pin header. Now I am using mostly 6 because I am breadboarding. Switching from 10 to 6 happened almost the same time as my upgrade Ubuntu 9.04 to 9.10.

Today I tried 10 again and it never fails at all. So now 6 is suspected to cause the issue. Still it is strange that 6 fails to work reliably with the Ubuntu host OS / avrdude but works perfectly well with a hosted Windows XP.

Dmesg showed the following

Code:
[  503.856663] usb 6-1: USB disconnect, address 2                                                
[  503.856672] usb 6-1.1: USB disconnect, address 3                                              
[  503.857019] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0  
[  503.857057] ftdi_sio 6-1.1:1.0: device disconnected
[  503.857351] usb 6-1.4: USB disconnect, address 4
[  505.336135] usb 6-1: new full speed USB device using uhci_hcd and address 5
[  505.502812] usb 6-1: configuration #1 chosen from 1 choice
[  505.504728] hub 6-1:1.0: USB hub found
[  505.508586] hub 6-1:1.0: 4 ports detected
[  505.789658] usb 6-1.1: new full speed USB device using uhci_hcd and address 6
[  505.945834] usb 6-1.1: configuration #1 chosen from 1 choice
[  505.953735] ftdi_sio 6-1.1:1.0: FTDI USB Serial Device converter detected
[  505.953789] usb 6-1.1: Detected FT232RL
[  505.953795] usb 6-1.1: Number of endpoints 2
[  505.953801] usb 6-1.1: Endpoint 1 MaxPacketSize 64
[  505.953806] usb 6-1.1: Endpoint 2 MaxPacketSize 64
[  505.953811] usb 6-1.1: Setting MaxPacketSize 64
[  505.958321] usb 6-1.1: FTDI USB Serial Device converter now attached to ttyUSB0
[  506.033659] usb 6-1.4: new full speed USB device using uhci_hcd and address 7
[  506.162716] usb 6-1.4: configuration #1 chosen from 1 choice

This is after disconnecting / connecting the hub and the isp. dmesg shows nothing after the failure.

Calling avrdude from the command line looks perfectly well, the second call just hangs.

In the first call with very verbose mode I get
Code:

avrdude: Version 5.8, compiled on Jul 20 2009 at 13:58:01
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch                      

         System wide configuration file is "/etc/avrdude.conf"
         User configuration file is "/home/udo/.avrduderc"    
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : usb
         Using Programmer              : stk500v2
avrdude: usbdev_open(): Found AVRISP mkII, serno: 000200036499
         AVR Part                      : ATMEGA48P            
         Chip Erase delay              : 45000 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     5     4    0 no        256    4      0  3600  3600 0xff 0xff
           flash         65     6    64    0 yes      4096   64     64  4500  4500 0x00 0x00
           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: AVRISP mkII                      
         Hardware Version: 1                                
         Firmware Version Master : 1.05                    
         Vtarget         : 4.9 V                            
         SCK period      : 154.37 us                        

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.03s

avrdude: Device signature = 0x1e920a
avrdude: safemode: lfuse reads as E3
avrdude: safemode: hfuse reads as DF
avrdude: safemode: efuse reads as 1
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.                        
avrdude: erasing chip                                                          
avrdude: reading input file "PicoTrigger.hex"                                  
avrdude: writing flash (402 bytes):                                            

Writing | ################################################## | 100% 2.21s

avrdude: 402 bytes of flash written

avrdude: safemode: lfuse reads as E3
avrdude: safemode: hfuse reads as DF
avrdude: safemode: efuse reads as 1
avrdude: safemode: Fuses OK        

avrdude done.  Thank you.
Subsequent calls with -v -v do not fail. One call without -v and it fails. Then -v -v subsequently fails as well and gives:

Code:
avrdude: Version 5.8, compiled on Jul 20 2009 at 13:58:01
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch                      

         System wide configuration file is "/etc/avrdude.conf"
         User configuration file is "/home/udo/.avrduderc"    
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : usb
         Using Programmer              : stk500v2

to be continued
3092  Forum 2005-2010 (read only) / Troubleshooting / Re: Strange AVRIspmkii issue on: April 28, 2010, 03:10:24 pm
For the sake of completeness (maybe it helps the analysis):

Code:
udo@laptop:~$ lsusb
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 006: ID 046a:0011 Cherry GmbH G83 (RS 6000) Keyboard
Bus 002 Device 005: ID 1267:0201 Logic3 / SpectraVideo plc A4Tech SWOP-3 Mouse
Bus 002 Device 004: ID 05e3:0606 Genesys Logic, Inc. USB 2.0 Hub / D-Link DUB-H4 USB 2.0 Hub
Bus 002 Device 003: ID 0c0b:b159 Dura Micro, Inc. (Acomdata)
Bus 002 Device 002: ID 05e3:0606 Genesys Logic, Inc. USB 2.0 Hub / D-Link DUB-H4 USB 2.0 Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 016: ID 03eb:2104 Atmel Corp. AVR ISP mkII
Bus 006 Device 015: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Bus 006 Device 014: ID 058f:9254 Alcor Micro Corp. Hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 0a5c:2145 Broadcom Corp.
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
3093  Forum 2005-2010 (read only) / Troubleshooting / Re: Strange AVRIspmkii issue on: April 28, 2010, 03:08:59 pm
I have no clue what to search for. This is the tail of dmesg:
Code:
[ 5069.797339] /dev/vmmon[5889]: PTSC: initialized at 2534000000 Hz using TSC
[ 5070.051881] /dev/vmmon[5889]: HV check: anyNotCapable=0 anyUnlocked=0 anyEnabled=0 anyDisabled=1
[ 5070.456622] i2c-adapter i2c-2: unable to read EDID block.
[ 5070.456631] i915 0000:00:02.0: HDMI Type A-1: no EDID data
[ 5070.461073] i2c-adapter i2c-2: unable to read EDID block.
[ 5070.461076] i915 0000:00:02.0: HDMI Type A-1: no EDID data
[ 5070.466030] i2c-adapter i2c-4: unable to read EDID block.
[ 5070.466032] i915 0000:00:02.0: HDMI Type A-2: no EDID data
[ 5070.470693] i2c-adapter i2c-4: unable to read EDID block.
[ 5070.470696] i915 0000:00:02.0: HDMI Type A-2: no EDID data
[ 5070.630953] i2c-adapter i2c-2: unable to read EDID block.
[ 5070.630956] i915 0000:00:02.0: HDMI Type A-1: no EDID data
[ 5070.635353] i2c-adapter i2c-2: unable to read EDID block.
[ 5070.635355] i915 0000:00:02.0: HDMI Type A-1: no EDID data
[ 5070.639782] i2c-adapter i2c-4: unable to read EDID block.
[ 5070.639784] i915 0000:00:02.0: HDMI Type A-2: no EDID data
[ 5070.644201] i2c-adapter i2c-4: unable to read EDID block.
[ 5070.644203] i915 0000:00:02.0: HDMI Type A-2: no EDID data
[ 5094.698318] i2c-adapter i2c-2: unable to read EDID block.
[ 5094.698321] i915 0000:00:02.0: HDMI Type A-1: no EDID data
[ 5094.703200] i2c-adapter i2c-2: unable to read EDID block.
[ 5094.703202] i915 0000:00:02.0: HDMI Type A-1: no EDID data
[ 5094.707905] i2c-adapter i2c-4: unable to read EDID block.
[ 5094.707907] i915 0000:00:02.0: HDMI Type A-2: no EDID data
[ 5094.712589] i2c-adapter i2c-4: unable to read EDID block.
[ 5094.712591] i915 0000:00:02.0: HDMI Type A-2: no EDID data
[ 5094.871837] i2c-adapter i2c-2: unable to read EDID block.
[ 5094.871840] i915 0000:00:02.0: HDMI Type A-1: no EDID data
[ 5094.876570] i2c-adapter i2c-2: unable to read EDID block.
[ 5094.876573] i915 0000:00:02.0: HDMI Type A-1: no EDID data
[ 5094.881092] i2c-adapter i2c-4: unable to read EDID block.
[ 5094.881094] i915 0000:00:02.0: HDMI Type A-2: no EDID data
[ 5094.886037] i2c-adapter i2c-4: unable to read EDID block.
[ 5094.886040] i915 0000:00:02.0: HDMI Type A-2: no EDID data
[ 5276.381412] usb 6-1.4: reset full speed USB device using uhci_hcd and address 13
[ 5276.693413] usb 6-1.4: reset full speed USB device using uhci_hcd and address 13
[ 5280.298609] usb 6-1.4: usbfs: process 5889 (vmware-vmx) did not claim interface 0 before use
[ 5320.729421] usb 6-1.4: reset full speed USB device using uhci_hcd and address 13
[ 5320.950418] usb 6-1.4: reset full speed USB device using uhci_hcd and address 13
[ 5323.789384] usb 6-1.4: usbfs: process 5889 (vmware-vmx) did not claim interface 0 before use
[ 5371.473425] usb 6-1.4: reset full speed USB device using uhci_hcd and address 13
[ 5371.714423] usb 6-1.4: reset full speed USB device using uhci_hcd and address 13
[ 5374.451193] usb 6-1.4: usbfs: process 5889 (vmware-vmx) did not claim interface 0 before use
[ 5415.069432] usb 6-1.4: reset full speed USB device using uhci_hcd and address 13
[ 5415.351365] usb 6-1.4: reset full speed USB device using uhci_hcd and address 13
[ 5523.909450] usb 6-1.4: reset full speed USB device using uhci_hcd and address 13
[ 5524.169458] usb 6-1.4: reset full speed USB device using uhci_hcd and address 13
[ 6305.108472] type=1503 audit(1272481594.617:22): operation="open" pid=6163 parent=6148 profile="/usr/sbin/cupsd" requested_mask="w::" denied_mask="w::" fsuid=0 ouid=0 name="/dev/ttyUSB0"
[ 6374.887585] usb 6-1.4: usbfs: process 6188 (avrdude) did not claim interface 0 before use
[ 6375.368574] usb 6-1.4: reset full speed USB device using uhci_hcd and address 13
[ 6375.649560] usb 6-1.4: reset full speed USB device using uhci_hcd and address 13
[ 8184.664199] usb 6-1: USB disconnect, address 11
[ 8184.664207] usb 6-1.1: USB disconnect, address 12
[ 8184.664699] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
[ 8184.664739] ftdi_sio 6-1.1:1.0: device disconnected
[ 8184.665107] usb 6-1.4: USB disconnect, address 13
[ 8185.896113] usb 6-1: new full speed USB device using uhci_hcd and address 14
[ 8186.061940] usb 6-1: configuration #1 chosen from 1 choice
[ 8186.063860] hub 6-1:1.0: USB hub found
[ 8186.065771] hub 6-1:1.0: 4 ports detected
[ 8186.345776] usb 6-1.1: new full speed USB device using uhci_hcd and address 15
[ 8186.501943] usb 6-1.1: configuration #1 chosen from 1 choice
[ 8186.509861] ftdi_sio 6-1.1:1.0: FTDI USB Serial Device converter detected
[ 8186.509919] usb 6-1.1: Detected FT232RL
[ 8186.509924] usb 6-1.1: Number of endpoints 2
[ 8186.509929] usb 6-1.1: Endpoint 1 MaxPacketSize 64
[ 8186.509934] usb 6-1.1: Endpoint 2 MaxPacketSize 64
[ 8186.509939] usb 6-1.1: Setting MaxPacketSize 64
[ 8186.510854] usb 6-1.1: FTDI USB Serial Device converter now attached to ttyUSB0
[ 8186.589778] usb 6-1.4: new full speed USB device using uhci_hcd and address 16
[ 8186.714932] usb 6-1.4: configuration #1 chosen from 1 choice
Udo
3094  Forum 2005-2010 (read only) / Troubleshooting / Strange AVRIspmkii issue on: April 28, 2010, 02:16:54 pm
I have some very strange avrispmkii issue running Ubuntu 9.10.
I can upload exactly once and then the isp hangs. If I disconnect the USB plug and plug it in again it will work once and then stop. Now if I install vmware and run winxp and install avrstudio inside the vm it can connect to the ISP and it works 100% perfect. Even several times in a row. If I tell vmware to release the ISP to the host (=Ubuntu) it will work once more and hang. If I grab control back with the vm, it will immediately work again. If I grab control and do nothing but release control to the host it will work once and hang again.

So two question:
- Has anyone an idea what is happening here?
- How can I tell Ubuntu in software to disconnect / reconnect the ispmkii? (I just want to run this everytime I want to flash).

Any hints for this strange behaviour are highly appreciated.

Udo
3095  Forum 2005-2010 (read only) / Troubleshooting / Re: Program Protection on: June 20, 2010, 11:04:08 am
Setting the fuses requires an ISP (or a second Arduino using an ISP sketch). If you "brick" this way, you can "unbrick" it this way as well. Unless of course you disable the reset pin or set the clock frequency to low for the ISP. This is something that usually does not happen accidentally. No need to be afraid.

Anyway: if you want software protection you are doing it commerically. In this case you should be prepared to spend more then just 20 or 30 bucks on prototyping equipment. So if you would brick it, no big deal anyway.

And while we are at it: if you do this commercially you might want to get rid of the Arduino boards because they are to expensive. If you do enough boards you can get the same stuff much cheaper.

Udo
3096  Forum 2005-2010 (read only) / Troubleshooting / Re: Program Protection on: June 19, 2010, 03:22:06 am
1) The source code is not stored in the controller
2) You can set the fuses to protect reading the compiled code from the controller. In order to do so consult the datasheet section 27.1 "Program And Data Memory Lock Bits".

This is not 100% bullet proof http://www.cl.cam.ac.uk/~sps32/mcu_lock.html. However the bullets will become much more expensive smiley-wink

Udo
3097  Forum 2005-2010 (read only) / Troubleshooting / Re: 2 dead arduino? on: June 05, 2010, 08:11:28 am
Good decision. Especially to go for avr-isp instead of playing roulette smiley-wink

Udo
3098  Forum 2005-2010 (read only) / Troubleshooting / Re: 2 dead arduino? on: May 22, 2010, 02:25:04 pm
Without any circuitry means exactly nothing but power, isp and connectors. Especially no crystal. And if the ISP happens  to be an avrispmkii the target voltage can be anything between 1.8 and 5.5V if the target can run it.

Udo
3099  Forum 2005-2010 (read only) / Troubleshooting / Re: 2 dead arduino? on: May 22, 2010, 02:23:45 pm
New chips always come without bootloader. So yes, it might be that the bootloader was the problem. I did some experiments and figured out the following:

You can configure the IDE such that it will compile and flash for chips right from the factory. That is for chips with setup for internal RC and CKDIV 8. That is you can compile, deploy and run without ANY external circuitry once you have an ISP.

I achieved this by adding the following to boards.txt

Code:

atmega328ispmk2.name=Arduino ATmega328 AvrISPmkII

atmega328ispmk2.upload.maximum_size=32768
atmega328ispmk2.upload.using=avrispmkii

atmega328ispmk2.build.mcu=atmega328p
#atmega328ispmk2.build.f_cpu=16000000L
atmega328ispmk2.build.f_cpu=1000000L
atmega328ispmk2.build.core=arduino

If you flash with external 16 MHz clock and CKDIV = 1 (=Arduino standard hardware and fuse settings), then you can set the programmer speed to 4 MHz which means that deployment gets ultrafast compared to the bootloader.

Udo
3100  Forum 2005-2010 (read only) / Troubleshooting / Re: 2 dead arduino? on: May 22, 2010, 06:20:45 am
Burning a bootloader is trivial once you have a "real" ISP. Using the arduino is somewhat more tricky. Once you have an  ISP you might wonder why you should actually need a bootloader anymore. Flashing through the ISP is just as easy as with the bootloader. However by default the IDE does not support this. You have to add some lines to the configuration to enable this.

http://www.arduino.cc/en/Hacking/Programmer

Of course you can use the ISP to flash the bootloader anyway and the proceed without ISP. But this is some somewhat pointless excersie. One of my Arduinos seems to have a broken solder joint to the FTDI chip --> bootloader fails consistently, flashing by ISP works excellent.

Udo
3101  Forum 2005-2010 (read only) / Troubleshooting / Re: Analog output fine until I turn on the car... on: May 21, 2010, 01:22:52 pm
I second Grumpy's statement. And here is one more link to give you an idea how noisy a car environment might be http://www.eet-china.com/ARTICLES/2003MAY/PDF/2003MAY26_POW_AN04.PDF.

Udo
3102  Forum 2005-2010 (read only) / Troubleshooting / Re: ATtiny2313 signature 0xffffff, why? on: May 22, 2010, 10:09:52 am
My suggestion is: use a "real" ISP. The avrispmkII is recommended. Unless you have a lot of expertise you will waste a lot of time searching for strange issues. Once you have sufficient expertise you will own an ISP anyway. Bit banging is something from the days when ISPs were very expensive or if you forgot the ISP somewhere. An ISP is typically faster and more reliable.

Udo
3103  Forum 2005-2010 (read only) / Troubleshooting / Re: retreve script on: May 10, 2010, 03:21:42 pm
If you have flashed the Arduino it implies the source was on your disk at one point in time. If you did not write to much after the crash you could still try to recover it. I would suggest to try Photorec http://www.cgsecurity.org/wiki/PhotoRec. This tool really rocks.

Otherwise you may want to have a look here: http://www.forensicswiki.org/wiki/Main_Page.

Udo
3104  Forum 2005-2010 (read only) / Troubleshooting / Re: time to switch between 0 and 1 and viceversa on: April 03, 2010, 08:47:41 am
25ms is a lot of time. The Arduino is definitely fast enough. This looks like an issue with you camera.

Udo
3105  Forum 2005-2010 (read only) / Troubleshooting / Re: Avrdude issue with ispmkii and Ubuntu 9.10 on: April 03, 2010, 10:37:57 am
Forget this question. The problem disapeared after I switched off my paper shredder. No clue if and/or why the shredder caused this issue. In theory it shouldn't...

Udo
Pages: 1 ... 205 206 [207] 208 209 ... 233