Sundance SMT356 User Manual
Page 22
Version 2.1
Page 22 of 26
SMT356356 User Manual
main()
{
volatile unsigned int *flash, delay;
volatile unsigned int i, j, b, pass, y, byte, load_word;
volatile unsigned *fifobase, *emifce3, *flags, temp,
flagpos, ctrl_word;
unsigned samples,leds,channels,divider,active_channels;
volatile char ch;
Point to comm port status register,
comm_status=(unsigned int *)0x01600010;
and to data register.
comm0_data =(unsigned int *)0x01600000;
We will have to change the ‘C60’s EMIF to change the memory type on memory
space CE3.
emifce3=(unsigned *)0x01800014;
This is where the FIFO flags are on the SMT332.
flags=(unsigned *)0x01580000;
And this is where the FIFO hangs out.
fifobase=(unsigned *)0x03800000;
This is the quick way to configure the SMT356’s Virtex.
printf("Configuring 356 from flash\n");
This address is defined by Sundance, and is where the configuration is stored.
flash =(unsigned *)0x01424000;
for(i=0;i!=0x35758/4;i++) {
Read the flash. Don’t forget to mask with 0xFF because the flash device only drives
the lower 8 bits, but is still accessed as a 32 bit word!
load_word= (*flash++)&0xff;
load_word+=((*flash++)&0xff)<<8;
load_word+=((*flash++)&0xff)<<16;
load_word+=((*flash++)&0xff)<<24;
comm_out(load_word);
}
printf("%08X done\n\n",flash);