CHAPTER 5 APPLICATION EXAMPLES
Application Note U17121EJ1V1AN
98
dsc_tbl->transfer_address = BASE_ADDRESS_SDRAM;
dsc_tbl->transfer_byte = 0x1000;
// = 4096byte = 8Sector
dsc_tbl->next_table_address = 0x00000001;
// Last table
*IDEREG_DSCTBL_START_ADDRESS = dsc_tbl;
// Sets transfer direction of UltraDMA transfer.
*IDEREG_BUSMASTER_START_STOP &= 0xFFFFFEFF;
// Ultra DMA (PCI->IDE)
// Buffer initialization
InitBuffer((UBYTE*)dsc_tbl->transfer_address, 512*8);
// Issues command of UltraDMA transfer.
ATA_Write_DMA(
0,
// Master Device
0,
// LBA 0
8,
// 8 Sector
);
////////////////////////////////
// PCI<-IDE UltraDMA transfer //
////////////////////////////////
// Sets descriptor table referenced by device during UltraDMA transfer.
dsc_tbl->transfer_address = BASE_ADDRESS 0x01000000;
dsc_tbl->transfer_byte = 0x1000;
// = 4096byte = 8Sector
dsc_tbl->next_table_address = 0x00000001;
// Last table
*IDEREG_DSCTBL_START_ADDRESS = dsc_tbl;
// Sets transfer direction of UltraDMA transfer.
*IDEREG_BUSMASTER_START_STOP |= 0x00000100;
// Ultra DMA (PCI<-IDE)
// Issues command of UltraDMA transfer.
ATA_Read_DMA(
0,
// Master Device
0,
// LBA 0
8,
// 8 Sector
);
status = memcmp(
(UBYTE*)(BASE_ADDRESS_SDRAM),
(UBYTE*)(BASE_ADDRES0x01000000),
512*8);
if ( status != 0 ) {
printf("Verify Error!: WRITE DMA, READ DMA\n");
}
return 0;
}
Содержание V850E/MA1
Страница 2: ...Application Note U17121EJ1V1AN 2 MEMO ...