USBaspLoader on AT90CAN128

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
niko
Posts: 1
Joined: Sun Aug 21, 2011 11:34 pm

USBaspLoader on AT90CAN128

Post by niko » Sun Aug 21, 2011 11:56 pm

Hello,

I'm trying to use the latest version of USBaspLoader on my Olimex AVR-CAN dev board (powered by an AT90CAN128) and cannot get my laptop to recognize the device.

I am 100% sure that my hardware isn't the problem, because the hid-mouse example works just fine (I'm pretty sure it's an addressing problem, because it only happens in the boot section).

Here's what I've changed in the original source-code so far:

I adjusted the makefile to reflect my board:
AT90CAN128
16MHz
Bootloader address = 0x1E000

I also had to change

Code: Select all

--section-start=.text=
to

Code: Select all

--section-start=.bootloader=
in the LDFLAGS or else I would always get an out of range error during flashing-

I edited the bootloaderconfig.h as follows:

Code: Select all

#define USB_CFG_IOPORTNAME      E
#define USB_CFG_DMINUS_BIT      6
#define USB_CFG_DPLUS_BIT       7
#define USB_CFG_CLOCK_KHZ       16000
#define SIGNATURE_BYTES             0x1e, 0x97, 0x81, 0
#define bootLoaderCondition()   1


and I edited usbconfig.h:

Code: Select all

#define USB_CFG_DRIVER_FLASH_PAGE       1
#define USB_INTR_CFG            MCUCR
#define USB_INTR_CFG_SET        ((1 << ISC70) | (1 << ISC71))
#define USB_INTR_ENABLE         EIMSK
#define USB_INTR_ENABLE_BIT     INT7
#define USB_INTR_PENDING        EIFR
#define USB_INTR_PENDING_BIT    INTF7
#define USB_INTR_VECTOR         INT7_vect


finally I included the usbconfig.h on top of the usbdrv.c.

My fuses:
BOD disabled
On-Chip Debug enabled
JTAG enabled
SPI enabled
Boot section size=8KB starting at 0x1E000
Boot reset enabled
External Clock enabled (CKSEL=1111, SUT=00)

I also tried with and without Lockbits (0xFF vs. 0xEF).

I know that the bootloader gets called upon reset, because I enable the dev-boards LED in the main function (It doesn't light up when i set the bootloaderCondition to 0).


As mentioned above, compiling & uploading the hid-mouse using the same settings works just fine (although not in the boot section of course).
I also got the bootloader working on 2 different ATmega8 boards, so im very sure that it is an adressing problem.

Any Hints?

Post Reply