[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] bootloader problem
From: |
Bob Paddock |
Subject: |
Re: [avr-gcc-list] bootloader problem |
Date: |
Thu, 27 Jan 2005 19:37:15 -0500 |
User-agent: |
KMail/1.7.2 |
On Wednesday 26 January 2005 09:07 pm, Lee Terry wrote:
> 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" ::);
Make sure you have rampz set to zero.
The datasheets says it will come up zero but in extensive testing I found
that is not the case. In my case when it came up non-zero the application
would not start.
--
http://www.softwaresafety.net/
http://www.unusualresearch.com/ http://www.bpaddock.com/