Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Reading Flash Above 256k
PostPosted: Fri Jul 31, 2009 11:04 pm 
Offline

Joined: Fri Jul 31, 2009 10:28 pm
Posts: 6
I'm using the Keil compiler and an AT91SAM7S512 and I'm having an issue. I am using a bootloader and I want to load application code into the second bank of the device. I have a few problems...

1. I can't read back the code above 0x140000 to verify that is is properly written. Below 256k, I would do something like the following:
Code:
UINT8 *ptr;
UINT32 address = 0x100000;
UINT32 i;
   
   for (address = 0x100000; address < 0x140000; address++)
   {
      ptr = (UINT8*)address;
      printf("%u ", *ptr);
   }

Right now, all I get back is 0's.

2. Once I can verify that I've written the code and I want to jump to it from the bootloader, is it as simple as setting a void pointer to 0x140000 and jumping to it?


Top
 Profile  
 
 Post subject: Re: Reading Flash Above 256k
PostPosted: Fri Jul 31, 2009 11:41 pm 
Offline

Joined: Fri Jul 31, 2009 10:28 pm
Posts: 6
I've usually found that if I post my problem that I'll solve it within minutes.

I think I've successfully bootloaded the code into the second flash bank. I found that in my SAM7.s initialization code that the setup for ECF1 was basically ifdef'ed out. Now that I've enabled it, my bootloaded loaded the code and calculated the CRC and it matches the expected value. However, the application doesn't run. So, that being said, is there something I have to do in order to jump to the second bank?


Top
 Profile  
 
 Post subject: Re: Reading Flash Above 256k
PostPosted: Fri Jul 31, 2009 11:57 pm 
Offline

Joined: Fri Jul 31, 2009 10:28 pm
Posts: 6
And the answer to question number 2 is "no." I have now bootloaded to the second bank and jumped to the application. Not positive that everything is dandy, but it looks like it worked.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: