Search found 6 matches

by gruvin
Tue Aug 21, 2012 8:08 am
Forum: V-USB
Topic: V-USB on ATmega2560 -- bad descriptor
Replies: 6
Views: 8974

Re: V-USB on ATmega2560 -- bad descriptor

Ah, Cool. Thanks!

Yes, that fixed it. Yay \o/ :-D
by gruvin
Sun Aug 19, 2012 11:41 am
Forum: V-USB
Topic: V-USB on ATmega2560 -- bad descriptor
Replies: 6
Views: 8974

Re: V-USB on ATmega2560 -- bad descriptor

UPDATE Another wee bug for device with a lot of Flash. I had to change the following line in main.c ... *data = pgm_read_byte((void *)CURRENT_ADDRESS); ... to ... *data = pgm_read_byte_far(CURRENT_ADDRESS); Hmmm, for compatibility with smaller ATmega's still, I probably should have made it ... #if (...
by gruvin
Sun Aug 19, 2012 9:34 am
Forum: V-USB
Topic: V-USB on ATmega2560 -- bad descriptor
Replies: 6
Views: 8974

Re: V-USB on ATmega2560 -- bad descriptor

UPDATE

Code reformed to avoid the compiler warning about type casting ...

Code: Select all

#define USB_READ_FLASH(addr)    pgm_read_byte_far(0x30000UL + (unsigned)(addr))
by gruvin
Sun Aug 19, 2012 7:04 am
Forum: V-USB
Topic: V-USB on ATmega2560 -- bad descriptor
Replies: 6
Views: 8974

Re: V-USB on ATmega2560 -- bad descriptor

UPDATE: I have confirmed that the wrong USB_READ_FLASH macro is being defined, in usbdrv/usbportatbility.h ... #ifdef USB_CFG_DRIVER_FLASH_PAGE # define USB_READ_FLASH(addr) pgm_read_byte_far(((long)USB_CFG_DRIVER_FLASH_PAGE << 16) | (long)(addr)) #else # define USB_READ_FLASH(addr) pgm_read_byte(ad...
by gruvin
Sun Aug 19, 2012 6:34 am
Forum: V-USB
Topic: V-USB on ATmega2560 -- bad descriptor
Replies: 6
Views: 8974

Re: V-USB on ATmega2560 -- bad descriptor

UPDATE: I just updated the usbdrv/ folder from USBaspLoader.2010-07-27 to the latest vusb-20120109 version. No change.
by gruvin
Sun Aug 19, 2012 6:28 am
Forum: V-USB
Topic: V-USB on ATmega2560 -- bad descriptor
Replies: 6
Views: 8974

V-USB on ATmega2560 -- bad descriptor

Hello I'm trying to get USBaspLoader.2010-07-27 working on an ATmega2560, in the bootloader area. There seems to be some problem with the device descriptor location in Flash (progmem), despite having ... #define USB_CFG_DRIVER_FLASH_PAGE 3 (My ATmega2560 bootloader is of course installed at 0x3E000....