Circuit design error, looking for a workaround

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Circuit design error, looking for a workaround

1,269 Views
angelo_d
Senior Contributor I

Hello all,

 

i have developed a little custom board, with a MCF5307, a 16x2MB (word programmable) parallel flash (SST39VF3201B), a 16MegB. SDRAM and some other peripheral.

 

Anyway, since this is one of my first quite big embedded circuit development, i connected for error the flash memory address bus with A0 -> A0 of the micro, A1->A1, A2->A2 ... instead of A0 to A1, A1->A2 etc.

Running through codewarrior/BDM from internal ram i can read and write it anyway using some C cast + byte swap, like below:

 

 

volatile unsigned char* baseaddress = 0xFFC0;

unsigned short test = *(unsigned short*)(baseaddress);

// test then need to be swapped to read the correct value
.....

 

Anyway, i am quite sure that, even if i program the flash, the MCF5307 will not be able to boot reading from the flash.

 

The board is just a prototype, but anyway, if someone know of some trick for the boot, this is really appreciated.

 

Many thanks in advance,

Angelo

 

Message Edited by spectrum on 2009-06-22 08:14 AM
Message Edited by spectrum on 2009-06-22 08:14 AM
Labels (1)
0 Kudos
Reply
2 Replies

449 Views
Dave_at_Mot
Contributor III

If you are just looking to boot, I think what you need to do is to program each word at two locations.  Put the first word at word address: 0x00000000 and 0x00000001, the second at: 0x00000002 and 0x00000003, and so on.  In this way the FLASH essentially ignores the A0 (byte address) that you have connected to the lowest address lead.  Of course you will waste half the flash since each word will have to appear twice, but it should at least run. 

 

Dave

 

0 Kudos
Reply

449 Views
angelo_d
Senior Contributor I

Thank you Dave,

thats seems to work.

 

Anyway, i still need some help:

tha flash memory is programmed correctly but the device sometime start the boot (i see this with some leds), but mostly not.

Seems some wait states or bus clock issue.

I have the following CS0 hard reset pullup/down config:

 

Crystal is 40 Mhz.

 

D0 ->0; D1 ->1  : Input 40Mhz -> CPU to 80 ->Bus Cloc -> 40

D2->0; D3 -> 1: PLL between 39 and 45

D5 ->1; D6->1 D7->0 : 15WS, 16BIT

 

The flash memory i am using is a 70ns, so 3WS should be enough.

 

If any help,

many thanks,

Angelo

 

0 Kudos
Reply