MC 68360: first start by BDM with empty flash?

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hello,

I'm designing a board based on the MC68360, and I'd like to wire some
Flash directly to CS0 (CSBOOT). I will provide a BDM-connector and use
this for the first start of the board.

On the first startup, I don't have any code in the Flash, so I have to
program the Flash via BDM. For this, I'd like to download a little
program into RAM - but hey, can I get access to my RAM right now? I
have to set MBAR to access the CS-registers. To set MBAR, according to
the data sheet, I have to use a MOVES-instruction.

Is any BDM out there, that supports a MOVES? Or is direct flash
programming by BDM my only option?

Andreas
--
Good judgment comes from experience. Unfortunately, the experience
usually comes from bad judgment.


Re: MC 68360: first start by BDM with empty flash?

Quoted text here. Click to load it

Look at www.macraigor.com  - they have what you need...

regards

Dejan



Re: MC 68360: first start by BDM with empty flash?

Quoted text here. Click to load it

Via the BDM, you can read and write processor registers, system registers,
memory, and memory-mapped peripherals.  The basic idea is to use the BDM
to set up the chip selects, clock module, ram module, and any other
initialisation you need.  You then download a flash programmer stub (as
you suggested) to ram, and the flash image to a ram buffer (depending on
sizes, the buffer may need to be used many times over).  The BDM starts
the burner program, which exists to the BDM with a "break" instruction.

There are commercial programs that automate this - we have used P&E
Micro's flasher program with their BDM unit.  You can also roll your own -
try sourceforge.net/projects/bdm/ as a starter.  It's also quite possible
(and practical) to use gdb scripts.


Re: MC 68360: first start by BDM with empty flash?

Quoted text here. Click to load it


Sorry to follow up to my own posting, but I just discovered, that even
Scott Howards's old BDM supports this by the "FC" command. That's
enough to get access to MBAR - just "FC 7" and write to MBAR.

Quoted text here. Click to load it

Thanks, David. The problem with the 68360 is, that there are no
special registers (chip selects etc.) available until you assign them
a base address by writing to MBAR. So the only thing you can access is
the memory adressed by CS0 (Flash, in my case). And MBAR is only
accessable in CPU-Space, i.e. with a Function Code 7, which, again, by
a program, can only be done using the MOVES-instruction after setting
DFC and SFC. I just didn't saw a way to force the BDM to use the
appropriate function code - maybe, I read the manual with my eyes wide
shut.

Thanks.

Andreas
--
It's not the things you don't know what gets you into trouble. It's
the things you do know that just ain't so.
We've slightly trimmed the long signature. Click to see the full one.
Re: MC 68360: first start by BDM with empty flash?

Quoted text here. Click to load it

Years ago, I did a project using 2 68360s, one as a slave. Surprised
when powering up the prototype- it kept resetting itself. The answer was
that while the BDM inhibited the master watchdog, it did nothing about
the slave, which timed out merrily and reset everything else. Boohoo.
Had to add a buffer, OC of course, and this was before single- gate
packages were widely available. I think Motorola missed a trick there.

Paul Burke

Re: MC 68360: first start by BDM with empty flash?

Quoted text here. Click to load it

I've only used the 68332 (and recently a ColdFire), which has doesn't have
this problem.  However, I note that in the bdm drivers on sourceforge, the
drivers will automatically set the DFC and SFC when you access the MBAR
register.

David


Quoted text here. Click to load it


Site Timeline