USB\DEVICE_DESCRIPTOR_FAILURE
Posted: Thu Sep 21, 2017 8:47 am
first, please sorry. i am a total newbie to build custom µc circuits and programming in c. normally i only do c#, java and javascript projects.
I build up a simple circuit with a attiny85 and 3,3v drop regulator and a usb connection. i customized the usbconfig.h and the project perfectly builds in atmel studio, but if i plug it to my windows 10 notebook it just says USB\DEVICE_DESCRIPTOR_FAILURE. if tried to reinstall the libusb driver as well as automatically select a driver in the windows device manager but still windows can not even get the correct vendorid. if tried everything i could imagine for the last couple of days but got no progress at all. meanwhile i am close to totally freak out. does someone of you guys have an other idea? please help...
i build up the usb connection with D+ on PB0 and D- on PB1. I added 68 ohm resistors to limit the current and added a 1k5 ohm pullup resistor to D- and 1m ohm pullup resistor to D+. If i check the voltage the attiny provides about 3.1v at d- and about 0.4v at d+.
this is my main file:
it should simply build up a usb connection and make a led on PB4 blink with 2hz...
i build up the project along the tutorial from codeandlife http://codeandlife.com/2012/01/29/avr-attiny-usb-tutorial-part-1/
if i comment out all the usb stuff in the code, the µc starts blinking as excpected, so that i rather think of a hardware or windows error...
thanks a lot
I build up a simple circuit with a attiny85 and 3,3v drop regulator and a usb connection. i customized the usbconfig.h and the project perfectly builds in atmel studio, but if i plug it to my windows 10 notebook it just says USB\DEVICE_DESCRIPTOR_FAILURE. if tried to reinstall the libusb driver as well as automatically select a driver in the windows device manager but still windows can not even get the correct vendorid. if tried everything i could imagine for the last couple of days but got no progress at all. meanwhile i am close to totally freak out. does someone of you guys have an other idea? please help...
i build up the usb connection with D+ on PB0 and D- on PB1. I added 68 ohm resistors to limit the current and added a 1k5 ohm pullup resistor to D- and 1m ohm pullup resistor to D+. If i check the voltage the attiny provides about 3.1v at d- and about 0.4v at d+.
this is my main file:
it should simply build up a usb connection and make a led on PB4 blink with 2hz...
Code: Select all
#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/wdt.h>
#include "usbdrv.h"
#define F_CPU 16500000UL
#include <util/delay.h>
USB_PUBLIC uchar usbFunctionSetup(uchar data[8]) {
return 0; // do nothing for now
}
int main() {
uchar i;
wdt_enable(WDTO_1S); // enable 1s watchdog timer
usbInit();
usbDeviceDisconnect(); // enforce re-enumeration
for(i = 0; i<250; i++) { // wait 500 ms
wdt_reset(); // keep the watchdog happy
_delay_ms(2);
}
usbDeviceConnect();
sei(); // Enable interrupts after re-enumeration
DDRB = 0b00010000;
while(1) {
wdt_reset(); // keep the watchdog happy
usbPoll();
//make the led blink with 2hz
PORTB = 0b00010000;
_delay_ms(250);
PORTB = 0b00000000;
_delay_ms(250);
}
return 0;
}
i build up the project along the tutorial from codeandlife http://codeandlife.com/2012/01/29/avr-attiny-usb-tutorial-part-1/
if i comment out all the usb stuff in the code, the µc starts blinking as excpected, so that i rather think of a hardware or windows error...
thanks a lot