avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] bootloader problem


From: Yannick PODGORSKI
Subject: Re: [avr-gcc-list] bootloader problem
Date: Thu, 27 Jan 2005 09:54:15 +0100

Hi Terry,
I'd got the same problem few weeks ago.
When the BOOTRST is programmed, the problem that is your mega128
resets when it jumps to the app. So, bootloader section starts again.
For me, that was the watchdog that resets the mega128 because I'd got
a tempo without wdt_reset().

In fact, when you make a jump, all configurations are kept. So see what
can reset your mega128 and stop it before your jump or do it at start
of your app.

I think your code is good.

Hope that help.


Yannick Podgorski
www.kuantic.com

----- Original Message ----- From: "Lee Terry" <address@hidden>
To: <address@hidden>
Sent: Thursday, January 27, 2005 3:07 AM
Subject: [avr-gcc-list] bootloader problem


Hi, all.

I wrote a bootloader for mega128, and here are the problems.

1. BOOTRST programmed
I upload an application, then jump to 0x0, bootloader section starts again.
  Below is the code I use when jumping to the app.

   boot_spm_busy_wait();
   __boot_rww_enable();
   MCUCR = (1<<IVCE);
   MCUCR = (0<<IVSEL);
   asm volatile("cli"::);
   asm volatile("jmp 0x0000" ::);


2. BOOTRST unprogrammed
After uploading an application, I jump to the app. section using the same code I wrote above, the application starts normally. But when I want to jump to the bootload section from the app. section, my bootloader program keeps restarting. And it seems running slowly. I changed the clock setting to/from external/internal clock, but it is same.

Below is the code that I use to jump from app. to bootloader.
MCUCR = BIT(IVCE);
MCUCR = BIT(IVSEL);
__disable_interrupt();
asm("jmp 0x1E000"); // jump to bootloader-reset-vec



Please tell me what I do wrong....

Terry.


---------------------------------
기본 250MB 최대 1GB, 더이상 용량 고민없는 야후! 메일을 써보세요. 야후! 비트박스 최신곡, 추천곡, 가요, OST, 팝송, 뮤직비디오 야후! 모바일
 최신 휴대폰 정보, 벨소리, 캐릭터, 문자메세지
_______________________________________________
avr-gcc-list mailing list
address@hidden
http://www.avr1.org/mailman/listinfo/avr-gcc-list



reply via email to

[Prev in Thread] Current Thread [Next in Thread]