c5402 bootloader; DARAM corrupts after starting target code

Started by mauriceambridge September 5, 2002

I am using a C5402 in my own prototype PCB which includes a 256KWord
FLASH & 2 64KWord RAMS. The Flash and Data RAM can be swapped using
an attached CPLD.

I have developed the DSP/BIOS source code to the point where I can
use hex500 to create a boot table which I program into flash so I
can use TI's ROM bootloader. (The code only actually uses the
internal DARAM, the external Program RAM being for future expansion,
and the external Data RAM being used at present for mass data
collection.) With single stepping, the bootloader can be seen to
fully program the DARAM correctly and it terminates and FBACC's to
the entry point. The DSP/BIOS initialisation code starts execution
but once it has reached a certain point, the program counter
increments as the code is single stepped but a vast portion of the
DARAM is filled with junk including the area where the program
counter is; the junk being mainly FFFFs. The point at which it
crashes does not fall on a power of 2 boundary and it repeats
exactly each time. The code is actually looping at this time so the
instruction at the crash point has already been executed.

I have fought my way to this point with the help of TI's .PDFs and
the help of the most excellent "TI 5402 DSK The Things I Learned the
Hard Way.htm" but I am up against a brick wall now.

I'm going to explore and change the start-up code to see if it makes
a difference but it would be great to hear from anyone who might be
able to shed light on this one.

Thanks in advance,

Maurice Ambridge