Pages: [1] 2   Go Down
Author Topic: [SOLVED]Leonardo Clone 32u4 based board it is not recognized in USB port  (Read 5091 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 1
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

   I did a board based on Arduino Leonardo design. After that I burned Caterina-Leonardo.hex bootloader and set the fuses like this:

leonardo.bootloader.low_fuses=0xff
leonardo.bootloader.high_fuses=0xd8
leonardo.bootloader.extended_fuses=0xcb
leonardo.bootloader.lock_bits=0x2F

Until now everything its fine.

But when I try to connect the board in my computer, I have this message

(Ubuntu dmesg command)

[11183.348043] usb 5-2: new low-speed USB device number 97 using uhci_hcd
[11183.528035] usb 5-2: device descriptor read/64, error -71
[11183.808033] usb 5-2: device descriptor read/64, error -71
[11184.080029] usb 5-2: new low-speed USB device number 98 using uhci_hcd
[11184.488034] usb 5-2: device not accepting address 98, error -71
[11184.600043] usb 5-2: new low-speed USB device number 99 using uhci_hcd
[11185.012038] usb 5-2: device not accepting address 99, error -71
[11185.012064] hub 5-0:1.0: unable to enumerate USB device on port 2

I also tried on Windows, and it sais "USB Device Unrecognized"

Any Idea?

I worked a lot in this board, and now I dont know how to solve this.
thanks a lot!



« Last Edit: April 28, 2013, 08:53:00 am by fandrade » Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 23
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sounds more like harware problem, can u post the schem?.

I thinking on a leak of capacitive on the UCap.

Try to use the same layout of the leonardo.
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i'll really appreciate if you can check this problem

ps: The schematich file it is atached


* leolivre.pdf (62.36 KB - downloaded 96 times.)
« Last Edit: April 04, 2013, 02:20:29 am by fandrade » Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Some extra information about signals,

when it is connected in the computer usb

I did some measurements with the multimeter:

vbus (7) 4.9v
vcc (14) 4,9v
uvcc (2) 4,92v
avcc (24) not connected
avcc2 (44) not connected
d+, d-  wires are ok.
ucap (6) 3,3v
aref (42) gnd
ugnd (5) gnd
pins 15, 23, 35 and 43 gnd
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 525
Posts: 26523
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Why did you leave AVCC & AVCC2 not connected?

"AVCC is the supply voltage pin (input) for all the A/D Converter channels. If the ADC is not used,
it should be externally connected to VCC. If the ADC is used, it should be connected to VCC
through a low-pass filter."

You are running the chip only partially powered.

There is also a lack of any power supply decoupling caps - should have a 0.1uF on every VCC/AVCC pin.

Try removing R4 - it may be interfering with your clock signal.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 1
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Why did you leave AVCC & AVCC2 not connected?

"AVCC is the supply voltage pin (input) for all the A/D Converter channels. If the ADC is not used,
it should be externally connected to VCC. If the ADC is used, it should be connected to VCC
through a low-pass filter."

You are running the chip only partially powered.

There is also a lack of any power supply decoupling caps - should have a 0.1uF on every VCC/AVCC pin.

Try removing R4 - it may be interfering with your clock signal.

Hi,

 It's not connected because I coudnt find the right inductor. It will be connected, but atually it isnt. I think USB port shoud work anyway...but i'm not sure.

I will add some 0.1uF caps as you said.

I had removed R4 before this problem started.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 525
Posts: 26523
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Put a jumper across your inductor pads.  At the worst, your ADC signals may be a little bit noisy, if you are using ADC.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 1
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, done, but still not working smiley-sad

I added some 0.1uF caps in vcc pins and also avcc it is now connected as you said. I'm still having the same result.

I watch d+ and d- at the oscilloscope and it look like dead. I did the same with another Arduino (mega) and it has some nice waves.

I don't know how to solve this smiley-sad
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well except that I tied the AVCCs directly to VCC and that I'm using an oscillator and not a crystal, my (working) schematic is the same. However, I've seen similar dmesg outputs on some of my devices due to soldering problems at the USB connector. Also, are you sure the caterina bootloader is installed correctly? Fusebits set correctly?
Quote from my internal Wiki:


Quote
Bootloader Installation

In order to use the Atmega32U4 with the Arduino SDK, the Atmel bootloader that is factory-default has to be replaced. In our setup, we use the Arduino Leonardo bootloader. It is called 'Caterina' and can be found in the Arduino directory:

Code:
arduino-1.0.2/hardware/arduino/bootloaders/caterina

Flash the bootloader to the chip using AVRDude:

Code:
avrdude -p m32U4 -P /dev/ttyS0 -U flash:w:Caterina-Leonardo.hex

After that, set the correct fusebits:

Code:
avrdude -p m32U4 -P /dev/ttyS0 -U lfuse:w:0xe0:m -U hfuse:w:0xd8:m -U efuse:w:0xcb:m

Try everything out:

Code:
avrdude -p m32U4 -P /dev/ttyS0 -nv

And you should get:

Code:
avrdude: safemode: lfuse reads as E0
avrdude: safemode: hfuse reads as D8
avrdude: safemode: efuse reads as CB

Now start the Arduino IDE. Select 'Arduino Leonardo' as your board and the matching '/dev/ttyACMn' port as port.

You can also check if the bootloader is running by connecting an LED to PC7. It should "breathe" (fade in/out) after startup.

Good Luck!

Logged


Offline Offline
Newbie
*
Karma: 1
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, I have good and bad news.

Good news, I did what you said, I had set the fuses as you propose and it worked. With "dmesg" command the board was recognized as a full speed usb device correctly (I think it was recognized as a mouse).
Then, just to check, I unpulgued the usb wire, and plugued it again, and nothing happened. This time, the board wasnt recognized. After that the board it's not working anymore. Microprocessor looks like dead. The voltage at Ucap (was 3.3v) now it is 0v. I cant reset de fuses with avrdude...I dont know whats happened.

Any Idea...??

I setted the fuses, plugued in, works, and then..die :S

Could the fuses be responsible of this? how?

Logged

Wahiawa, Hawaii
Offline Offline
God Member
*****
Karma: 29
Posts: 582
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The low fuse byte is wrong.  0xE0 is set for an external clock signal, not a crystal.  You need to set the low fuse back to 0xFF for external Crystal Oscillator.

Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The low fuse byte is wrong.  0xE0 is set for an external clock signal, not a crystal.  You need to set the low fuse back to 0xFF for external Crystal Oscillator.

Well, you were right. I didnt realize that kopfkopfkopfaffe said he wasnt using a cristal. Now the board It's live again, but with this configuration

avrdude: safemode: lfuse reads as E0
avrdude: safemode: hfuse reads as D8
avrdude: safemode: efuse reads as CB

(and external clock) I have the same problem at the begining of this post.

also with

leonardo.bootloader.low_fuses=0xff
leonardo.bootloader.high_fuses=0xd8
leonardo.bootloader.extended_fuses=0xcb

 (and a cristal) Same problem... :S

is the last configuration the default configuration for the fuses at leonardo board?

kopfkopfkopfaffe this is the output after burn the Caterina-Leonardo.hex file...but the led it is not breathing...

Code:

fede@leni:~$ avrdude -p m32U4 -P /dev/ttyUSB0 -c avrisp -b 19200 -U flash:w:arduino/arduino/hardware/arduino/bootloaders/caterina/Caterina-Leonardo.hex

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e9587
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 "arduino/arduino/hardware/arduino/bootloaders/caterina/Caterina-Leonardo.hex"
avrdude: input file arduino/arduino/hardware/arduino/bootloaders/caterina/Caterina-Leonardo.hex auto detected as Intel Hex
avrdude: writing flash (32722 bytes):

Writing | ################################################## | 100% 9.66s

avrdude: 32722 bytes of flash written
avrdude: verifying flash memory against arduino/arduino/hardware/arduino/bootloaders/caterina/Caterina-Leonardo.hex:
avrdude: load data flash data from input file arduino/arduino/hardware/arduino/bootloaders/caterina/Caterina-Leonardo.hex:
avrdude: input file arduino/arduino/hardware/arduino/bootloaders/caterina/Caterina-Leonardo.hex auto detected as Intel Hex
avrdude: input file arduino/arduino/hardware/arduino/bootloaders/caterina/Caterina-Leonardo.hex contains 32722 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 19.13s

avrdude: verifying ...
avrdude: 32722 bytes of flash verified

avrdude: safemode: Fuses OK

avrdude done.  Thank you.

fede@leni:~$


The actual fuse state is

Code:
fede@leni:~$ avrdude -p m32u4 -P /dev/ttyUSB0 -c avrisp -b 19200 -nv
avrdude: Version 5.11.1, compiled on Oct 30 2011 at 10:41:10
         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/fede/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyUSB0
         Using Programmer              : avrisp
         Overriding Baud Rate          : 19200
         AVR Part                      : ATmega32U4
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PA0
         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    10     8    0 no       1024    8      0  9000  9000 0x00 0x00
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           lock           0     0     0    0 no          1    0      0  9000  9000 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 AVR ISP
         Hardware Version: 2
         Firmware Version: 1.18
         Topcard         : Unknown
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e9587
avrdude: safemode: lfuse reads as E0
avrdude: safemode: hfuse reads as D8
avrdude: safemode: efuse reads as CB

avrdude: safemode: lfuse reads as E0
avrdude: safemode: hfuse reads as D8
avrdude: safemode: efuse reads as CB
avrdude: safemode: Fuses OK

avrdude done.  Thank you.

fede@leni:~$



weird, isn't it?

Any clue?



« Last Edit: April 06, 2013, 12:35:12 pm by fandrade » Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well,

   the led in pin pc7 its blinking smiley
   Still the same problem of the beginning, but now we know that bootloader its running.


   Here it is a short video http://www.youtube.com/watch?v=t-e35YtVw-g&feature=youtu.be
« Last Edit: April 06, 2013, 01:40:23 pm by fandrade » Logged

Wahiawa, Hawaii
Offline Offline
God Member
*****
Karma: 29
Posts: 582
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If the low fuse byte is still at 0xE0 it may not be running stable.

Try to set it again:
Code:
avrdude -p m32u4 -P /dev/ttyUSB0 -c avrisp -b 19200 -v -U lfuse:w:0xFF:m

Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am sorry, low fuse it is FF, I think I had paste an old output,

actually it is

Code:
avrdude: Device signature = 0x1e9587
avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as D8
avrdude: safemode: efuse reads as CB

avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as D8
avrdude: safemode: efuse reads as CB
avrdude: safemode: Fuses OK

avrdude done.  Thank you.
Logged

Pages: [1] 2   Go Up
Jump to: