Wolfgang Wegner

having a hard time getting SBF to work... (MCF5445x) - help needed

Discussion created by Wolfgang Wegner on Mar 18, 2010
Latest reply on Apr 29, 2010 by Wolfgang Wegner

Dear all,

 

I am trying to get SBF to work on my proprietary MCF5445x (360-pin) board.

 

I started with U-Boot for M54455EVB and modified it such that I can run it from the debugger with CONFIG_MONITOR_IS_IN_RAM. Now I want to get it into the serial flash (MX25L6405M), but without success yet.

 

What I did:

- add a binary SBF header to my U-Boot image:

> od -t x1 -A x1 /srv/tftp/u-boot.bin | head -10
000000 03 ff 03 00 00 00 00 00 00 00 00 00 00 00 00 00
000010 64 0a 30 00 00 00 00 80 00 00 8c 40 00 04 84 40
000020 00 04 84 40 00 04 84 40 00 04 84 40 00 04 84 40
*
000090 00 04 84 00 00 00 00 00 03 00 00 40 00 00 00 46
0000a0 fc 27 00 20 7c fc 00 80 18 20 bc c0 00 00 00 20
0000b0 7c fc 00 80 20 20 bc 00 00 fd c0 20 7c fc 00 80
0000c0 1c 20 bc 00 1f 00 01 20 7c c0 00 00 0c 70 00 30

The first 19 bytes are the SBF header (I made a small C program to generate it). I do not use PCI, and am supplying 50MHz to the processor running with VCO=500MHz, Core = 250 MHz, the PLL value is the same I am writing to PCR[PFDR] from the debugger.

 

When resetting the board, it does a little more initialization than with the serial flash erased, but does not work *). From the debugger, I can access the core and dump the memory:

 mcf5445x> memory read 0x80000000 64

0x80000000: 0x00000000 0x8000008C 0x40000484 0x40000484
0x80000010: 0x40000484 0x40000484 0x40000484 0x40000484
0x80000020: 0x40000484 0x40000484 0x40000484 0x40000484
0x80000030: 0x40000484 0x40000484 0x40000484 0x40000484
0x80000040: 0x40000484 0x40000484 0x40000484 0x40000484
0x80000050: 0x40000484 0x40000484 0x40000484 0x40000484
0x80000060: 0x40000484 0x40000484 0x40000484 0x40000484
0x80000070: 0x40000484 0x40000484 0x40000484 0x40000484
0x80000080: 0x00000000 0x00030000 0x40000000 0x46FC2700
0x80000090: 0x207CFC00 0x801820BC 0xC0000000 0x207CFC00
0x800000A0: 0x802020BC 0x0000FDC0 0x207CFC00 0x801C20BC

 

This looks fine to me, giving SP, PC, vectors (they pointing to SDRAM, but as interrupts are disabled, this should not matter, I guess?), SBF header and beginning of code. The first strange thing is the SBF control register:

 

mcf5445x> memory read16 0xfc0a0020
0xFC0A0020: 0x0004
mcf5445x> memory read16 0xfc0a0018
0xFC0A0018: 0x03FF

 

BLL is OK (I wrote 0x3ff), but why is BLDIV set to 4?

 

I can then even start the code by calling "go 0x8000008c" in the debugger (I have some debug LEDs I can access via early flexbus access, so I see the code execution starts).

 

Does anybody have an idea what I am doing wrong so that code execution does not start via SBF itself?

 

Regards,

Wolfgang

 

*) with the serial flash erased, I can not access the CPU from the debugger after reset. This works with my SBF header/U-Boot in place.

Outcomes