Setup with ATMega2560

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
wicked88
Posts: 1
Joined: Sat Jun 17, 2017 9:44 am

Setup with ATMega2560

Post by wicked88 » Sat Jun 17, 2017 9:49 am

Hi guys,

Im new to USB and V-USB. I'm trying to put to work the hid mouse in my Arduino Mega. Compilation is smooth, tho, whenever i connect the device it tells me that the device descriptor request failed. So, my guess goes to flash page. How can i find the flash page of the descriptors ??

-----------

I was testing everything with a USB Sniffer, here is what i got :

00000018 2017-06-17 19:27:14,4804743 +73,1020093 UP PnP: Device Connected
00000019 2017-06-17 19:27:14,4816281 +0,0011538 UP PnP: Device Surprise Removal
00000020 2017-06-17 19:27:14,4818536 +0,0002255 UP PnP: Device Disconnected

I also looked at this thread https://forums.obdev.at/viewtopic.php?t=6959 and corrected what the user pointed out regarding the flash stuff. Tho, it seems that my problem must come from another place, maybe circuitry ? Also, i can't compile the full sketch because i'm getting this error

Code: Select all

undefined reference to `usbCrc16Append
. I can see the prototypes in usbdrv.h but the definition is missing. Help ??

------------

Also, i've tried to print the reports memory address:

Code: Select all

   printf("\nStarting boot process ...\n");
   printf("Device Descriptor Mem Address: %p\n",(void *)(&usbDescriptorDevice[0]));
   printf("Configuration Descriptor Mem Address: %p\n",(void *)(&usbDescriptorConfiguration[0]));
   printf("Report Descriptor Mem Address: %p\n",(void *)(&usbDescriptorHidReport[0]));
   printf("String0 Mem Address: %p\n",(void *)(&usbDescriptorString0[0]));
   printf("String Vendor Mem Address: %p\n",(void *)(&usbDescriptorStringVendor[0]));
   printf("String Device Mem Address: %p\n",(void *)(&usbDescriptorStringDevice[0]));


And the result was:

Code: Select all

Starting boot process ...
Device Descriptor Mem Address: 0x106
Configuration Descriptor Mem Address: 0xe4
Report Descriptor Mem Address: 0x13a
String0 Mem Address: 0x136
String Vendor Mem Address: 0x124
String Device Mem Address: 0x118
Last edited by wicked88 on Sat Jun 17, 2017 10:13 pm, edited 2 times in total.

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

Re: Setup with ATMega2560

Post by ulao » Tue Jun 27, 2017 3:44 pm

What watt diodes do you have on the +/- leads.

Post Reply