beautypg.com

Figure 5 : dsp transfer via the local aperture 0 – Sundance SMT410 v.1.0 User Manual

Page 30

background image

Page 30 of 49

SMT410 User Manual V1.0

Figure 5 : DSP Transfer via the Local Aperture 0

Receive Target address via Com-Port

Link

i.e. 0xFE12 3000

Unlock the system register in PCI Bridge

#define LB_CFG_SYSTEM

(0x78>>2)

(divide by 4 to word align offset address of PCI

bridge register)

WritePCIRegisters((unsigned int)LB_CFG_SYSTEM,0xA05F);

// Unlock Code

WritePCIRegisters((unsigned int)LB_CFG_SYSTEM,0x22008800);

// Restore Value

Write Lower 24 bits of byte TargetAddress to the LB_MAP0_RES register

#define

LB_MAP0_RES

(0x5C>>2)

#define LB_MAP0_MEMORY_RW 0x00060000

#define LB_MAP0_ADDRESS_MASK 0xFF000000

WritePCIRegisters((unsigned int)LB_MAP0_RES,(unsigned int)(TargetAddress &
LB_MAP0_ADDRESS_MASK ) | LB_MAP0_MEMORY_RW);

// The LB_MAP0_MEMORY_RW must be Or’ed with the data to ensure the other register in
// the 32-bit word has its correct value.

Write WORD Aligned data to Local Aperture space 0.

WritePCIApperture0((ByteToWord32(((TargetAddress) & ~LB_MAP0_ADDRESS_MASK))),Length,buffer);

Where

void WritePCIApperture0(unsigned int address,unsigned long Length,unsigned int *buffer)

{

unsigned int Index;

globalbuswriteClockMB(0x18000000 + address , Length , buffer);

}