USB bootloader on ATmega128

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

 I try to run USB bootloader on Atmega128.

I use AVRUSBBoot from Thomas Fischl.

I change :

BOOTLOADER_ADDRESS = 1F800

Boot Flash section size=1024 words Boot start address=$FC00; [BOOTSZ=10]

 

and change :

    GICR = (1 << IVCE);  /* enable change of interrupt vectors */
    GICR = (1 << IVSEL); /* move interrupts to boot flash section */

 

to :

    MCUCR = (1 << IVCE);  /* enable change of interrupt vectors */
    MCUCR = (1 << IVSEL); /* move interrupts to boot flash section */

 

and set BOOTRST=0 fuse bit to  start boot loader after reset.

 

I comment BOOTLOADER_CONDITION and leaveBootloader() to run without exit from boot loader.

but it's not work. and my pc not detect usb AVRUSBBoot.

 

I try again and change :

 

BOOTLOADER_ADDRESS = 0000

and unprogrmmed BOOTRST fuse bit = 1

and comment the MCUCR

    //MCUCR = (1 << IVCE);  /* enable change of interrupt vectors */
    //MCUCR = (1 << IVSEL); /* move interrupts to boot flash section */

 

it's work usb and detect my pc AVRUSBBoot!

 

please help me to install usb bootloader on ATmega128.

 

thanks.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Was your BL compiled for the M128?   Please provide a link to the BL.

Because of the large size flash it will require a BL designed for the large address space.

 

 

JC

 

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi ki0bk,
My problem is USB detection in Windows.
I attached two file :

 

  1. NotWork.rar -> USB not work and pc not detect it, (BOOTLOADER_ADDRESS = 1F800 , MCUCR = (1 << IVCE), MCUCR = (1 << IVSEL), BOOTRST = 0)
  2. USB_worked.rar - > USB work good, but without bootlader,  (BOOTLOADER_ADDRESS = 00, //MCUCR = (1 << IVCE), //MCUCR = (1 << IVSEL), BOOTRST = 1)

 

AVRUSBBoot - USB bootloader for Atmel AVR controllers : http://www.fischl.de/avrusbboot/

 

Thanks.