Running in RAM

Hi,

I am working with a Rabbit 2000 processor as a slave processor to a SH-4. Currently I program the rabbit by loading the code from the SH-4 through the rabbit slave port to the flash while in slave mode. The commands to setup the rabbit registers and erase the flash along with the program data are written to the flash through the use of triplets. This works fine.

I am currently trying to load a small program into the rabbit�s ram and then have the rabbit start executing that program from address 0x0000. The purpose of this program is to determine the flash ID so the flash can be programmed with the main program correctly. I am programming the rabbit registers, and ram through the use of triplets in slave mode over the slave port. I have a logic analyzer connected to watch SMODE, CS1, OE1, WE1 and some address lines. When I attempt to write the flash program to RAM the WE1 line never toggles. Once the program is done attempting to load the Rabbit reboots from flash as if it ignores the setting in MB0CR.

I have listed the commands that are sent over the slave port hoping you can help me determine why the rabbit is not toggling WE1 and still booting from flash .

Thanks for you help

Matt

//Enter Slave mode
SMODE0 = 1
SMODE1 = 0

0x80,0x00,0x08, //GCSR
0x80,0x10,0x00, //MMIDR
0x80,0x14,0x45, //MB0CR
0x80,0x15,0x45, //MB1CR
0x80,0x16,0x40, //MB2CR
0x80,0x17,0x40, //MB3CR
0x80,0x13,0xC6, //SEGSIZE
0x80,0x11,0x74, //STACKSEG
0x80,0x12,0x3A};//DATASEG

Starting at address 0x0000 the program is sent using triplets.

Following the program
0x80, 0x24, 0x80
is sent to exit bootstrap operation

You sure the addresses you’re trying to use aren’t reserved by some sort of ISR or simply meant for the core bootup of the Rabbit?

There may be some sort of an exception along these lines which is causing your problem. Thus, try perhaps 0x1000 or something like that… well usually that works for me.

Thanks for the reply.

I checked the address I am writing to and it wasn’t reserved. It turns out I had 2 problems. I first had to disable the watchdog timer, becase it was timing out and second I had to compile using the directions below to get a .bin file the would work for me.

> 1. In the compiler options set BIOS memory mode to “Compile to RAM”.
>
> 2. Set default Compile mode to: “Compile defined target
configuration to
> .bin file”
> (do not use compile to .bin using attached target, that is
unreliable.)
>
> 3. Set the board type in the “Targetless compile” tab.
>
> 4. Use F5 to compile

Well, it’s good to hear you weren’t still stuck after a couple of months. :wink:

I replied because this seems like something which I may need for another project.

Hi

Thanks to everyone and to this site,because i am getting more information about the software and hardware.This information are more helpful to me.


Translations
Self Certification Mortgage Quotes