AVR_USB timing out?

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
centrino
Posts: 2
Joined: Sat Apr 19, 2008 12:08 am

Post by centrino » Sat Apr 19, 2008 12:34 am

I have similar problem too.
My board with mega8 mcu used for retrieve data from dallas 1-wire temperature sensor and next to computer. I'am use "commandline" program from powerswitch distributive with some tiny changes. About 5-10 hours it's works is fine then i have -
"Warning: cannot query manufacturer for device: error sending control message: Input/output error".
Used OS - FreeBSD 7.0-STABLE.
In system logs no messages about connect/disconnect.
Only disconnect and connect by hand enables board for further operate...
I'am use zener diode on D+ and D-... hmm 3.3v.

and i'am use usb drivers from last powerswitch (2008-02-28)

P.S.: Sorry for bad english.

christian
Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Post by christian » Mon Apr 21, 2008 10:39 am

3.3 V Zener diodes are not a very good idea. Can you please measure the voltage level on D-? Is it well above 2.5 V?

centrino
Posts: 2
Joined: Sat Apr 19, 2008 12:08 am

Post by centrino » Tue Apr 22, 2008 11:52 pm

christian wrote:3.3 V Zener diodes are not a very good idea. Can you please measure the voltage level on D-? Is it well above 2.5 V?


Yes, I have measured. Between VCC and D- voltage 3.15V, between GND and D- voltage 1.95V. It is normal? No?
Also before your post I have changed connection 1.5K pullup resistor from VCC to pin on MCU and change firmware as it was recommended earlier:

Code: Select all

int main(void)
{
    uchar i;
    usbInit();
    /* enforce USB re-enumerate: */
    usbDeviceDisconnect();  /* do this while interrupts are disabled */
    for(i=0;--i;){          /* fake USB disconnect for > 250 ms */
        _delay_ms(1);
    }
    usbDeviceConnect();
    ....
    sei();
    for(;;){ /* main loop */
        usbPoll();
        ....
    }
}


defined USB_CFG_PULLUP_IOPORTNAME, USB_CFG_PULLUP_BIT also.

it has worked some days, and I was already happy, but... again all has repeated.
One more interesting thing. The program(firmware) thus works, as the light-emitting diode blinks in cycle... but usb-connection is down.

Thanks for help, christian.

christian
Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Post by christian » Wed Apr 23, 2008 9:30 am

You don't need USB_CFG_PULLUP_IOPORTNAME in the most recent releases of the driver in order to use usbDeviceDisconnect() and usbDeviceConnect().

1.95 V is far below the limit of 2.5 V. Please use higher voltage and lower power diodes. You should reach AT LEAST 2.5 V.

Post Reply