BootloadHID - device is not recognized

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
yariash

BootloadHID - device is not recognized

Post by yariash » Sun Oct 10, 2010 11:00 am

I am trying to make a bootloader on Atmega8. I connected d- to PD0, d+ to PD2 (int 0), and I put 1.5k resistor between Vcc and D-. Only thing I changed on firmware code is Bootloader Condition (PD4 instead of PD5). I am sure PD4 is binded to zero. I compiled it with Win-Avr. When I connect the device I get "Device is not recognized". Iam sure Atmega is fine ( i can check it with isp programmer). I dont where problem is, I've tried everything. I was checking connections, replacing uC, and quartz? Any suggestions?

_frank26080115

Re: BootloadHID - device is not recognized

Post by _frank26080115 » Sun Oct 10, 2010 5:35 pm

did you also change bootLoaderInit the same way you changed bootLoaderCondition?

did you compile with the right clock speed? are your fuse settings correct? "clock divide by 8" should be off

yariash

Re: BootloadHID - device is not recognized

Post by yariash » Sun Oct 10, 2010 8:46 pm

Yes, I modified bootLoaderInit, and set fusebits to 0xc0 (high) and 0x9f(low) (as it is written in comments in makefile). Ive got 12 MHz crystal oscillator.
When I connect the device I get something like that on data lines:

Image

Uploaded with ImageShack.us

Top is D+ and bottom is D-. After that "device is not recognized" pops up and D+ goes to low and D- to high state.

When I measure the frequency on crystal it goes from 11.9 to 12.1 MHz, maybe it is not precise enough?

I also dont have 3.6V diodes on data lines.

dzairo
Rank 1
Rank 1
Posts: 35
Joined: Wed Sep 22, 2010 3:31 pm

Re: BootloadHID - device is not recognized

Post by dzairo » Sun Oct 10, 2010 8:50 pm

hi .
I too have problem to use any bootloader in ATmega8 or ATmega168.
I use USB CDC-232 project an work good , no problem use this code ,
but if want use any bootloader (HID or USBasp) then I have problem still show device not recognized .
If use normal any HID code (like for keyboard) then no problem , then I receive key but if want use any bootloader then don't work.
I know If I make good change in some *.h file . yes make it.
hey how programmer know so must write code into flash position start form ATmega8 1800 and for ATmega168 3800 .
I make correct fuse bit.

If compile any bootloader code then make *.hex file if convert it into *.bin then see so file is max 2kB size but if programmer start burn data then start from position 0.
how programmer know where need start?????
in program is set start offset address but I thinks so problem is ?????

I try clear all flash (ATMega168) and burn it then I look in to flash (use dW) where are data .

any suggestion????

dzairo
Rank 1
Rank 1
Posts: 35
Joined: Wed Sep 22, 2010 3:31 pm

Re: BootloadHID - device is not recognized

Post by dzairo » Mon Oct 11, 2010 10:48 am

Hi I solve this problem.
look at this forum http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=98930

regards

ps2chiper
Posts: 12
Joined: Fri Oct 01, 2010 5:43 pm

Re: BootloadHID - device is not recognized

Post by ps2chiper » Wed Oct 13, 2010 12:50 pm

No matter what I do to bootloaderhid I cant get past this error.
[187296.430080] hub 6-0:1.0: unable to enumerate USB device on port 1
[187419.360072] usb 6-1: new low speed USB device using ohci_hcd and address 124
[187419.930059] usb 6-1: device not accepting address 124, error -62
[187419.990317] hub 6-0:1.0: unable to enumerate USB device on port 1

But hid-mouse works fine.

ps2chiper
Posts: 12
Joined: Fri Oct 01, 2010 5:43 pm

Re: BootloadHID - device is not recognized

Post by ps2chiper » Thu Oct 14, 2010 3:59 am

I got it working only when the reset pin is grounded. it wont got into bootloader mode and stay in bootloader mode

ulao
Rank 4
Rank 4
Posts: 481
Joined: Mon Aug 25, 2008 8:45 pm

Re: BootloadHID - device is not recognized

Post by ulao » Thu Oct 14, 2010 4:53 pm

This may sound like a dumb question , but what pin are you sensing to enter the boot loader?

ps2chiper
Posts: 12
Joined: Fri Oct 01, 2010 5:43 pm

Re: BootloadHID - device is not recognized

Post by ps2chiper » Thu Oct 14, 2010 5:08 pm

The default Port D Pin 3. I have it going to a button than to ground.

maxi
Rank 3
Rank 3
Posts: 122
Joined: Fri Jul 24, 2009 6:13 pm

Re: BootloadHID - device is not recognized

Post by maxi » Thu Oct 14, 2010 8:10 pm

ps2chiper wrote:The default Port D Pin 3. I have it going to a button than to ground.


I suggest you also attach a pull-up resistor to V+ otherwise the input will 'float'.

ps2chiper
Posts: 12
Joined: Fri Oct 01, 2010 5:43 pm

Re: BootloadHID - device is not recognized

Post by ps2chiper » Thu Oct 14, 2010 8:28 pm

well here is a copy of my schematic, I am unclear where you want me to place the pull up resistor.
http://hotfile.com/dl/76008947/a9d363e/ ... 8.pdf.html

maxi
Rank 3
Rank 3
Posts: 122
Joined: Fri Jul 24, 2009 6:13 pm

Re: BootloadHID - device is not recognized

Post by maxi » Thu Oct 14, 2010 8:43 pm

That schematic shows pin 3 connected directly to ground. If you have added a switch between pin 3 to ground then you should also add a resistor from pin 3 to Vcc, a 4K7 - 10K should be fine here. Look how it's done (with a 1K resistor) on the reset pin :wink:

[edit]Not sure if you're meaning pin 3 or PD3, appologies.

ps2chiper
Posts: 12
Joined: Fri Oct 01, 2010 5:43 pm

Re: BootloadHID - device is not recognized

Post by ps2chiper » Thu Oct 14, 2010 8:50 pm

PD3 is my reset switch for bootloadhid. Its not in the schematic.

ps2chiper
Posts: 12
Joined: Fri Oct 01, 2010 5:43 pm

Re: BootloadHID - device is not recognized

Post by ps2chiper » Thu Oct 14, 2010 8:53 pm

I think I get your point. Similar to how the arduino has a reset switch on the reset pin. It uses a 1k resistor to feed vcc to it and the switch is connected to ground. and you want me to do the same thing for pd3.

maxi
Rank 3
Rank 3
Posts: 122
Joined: Fri Jul 24, 2009 6:13 pm

Re: BootloadHID - device is not recognized

Post by maxi » Thu Oct 14, 2010 8:58 pm

You got it, though personally I think 1K is a bit 'strong', I prefer using 10K myself.

Post Reply