- renamed SPI registers
git-svn-id: http://moon:8086/svn/mips@49 a8ebac50-d88d-4704-bea3-6648445a41b3
This commit is contained in:
@@ -46,10 +46,10 @@ void main()
|
||||
volatile uint32_t *pTim_stat = (uint32_t*)SYS_ITIM_STAT;
|
||||
volatile uint32_t *pTim0_cnt = (uint32_t*)SYS_ITIM0_CNT;
|
||||
volatile uint32_t *pTim0_cmp = (uint32_t*)SYS_ITIM0_CMP;
|
||||
volatile uint32_t *pSpiCtrlStat = (uint32_t*)SYS_SPI_CTRL_STAT;
|
||||
volatile uint32_t *pSpiData = (uint32_t*)SYS_SPI_DATA;
|
||||
volatile uint32_t *pSpiXferSize = (uint32_t*)SYS_SPI_XFER_SIZE;
|
||||
volatile uint32_t *pSpiDataSize = (uint32_t*)SYS_SPI_DATA_SIZE;
|
||||
volatile uint32_t *pSpiData = (uint32_t*)SYS_SPI_DATA;
|
||||
volatile uint32_t *pSpiStat = (uint32_t*)SYS_SPI_STAT;
|
||||
volatile uint32_t *pSpiCtrl = (uint32_t*)SYS_SPI_CTRL;
|
||||
*pTim0_cnt = 0;
|
||||
*pTim0_cmp = 2500000; // 50 ms @ 50 Mhz
|
||||
@@ -92,21 +92,21 @@ void main()
|
||||
*pSpiData = 0x9F000000;
|
||||
*pSpiDataSize = 8;
|
||||
*pSpiXferSize = 8+648;
|
||||
*pSpiCtrlStat = SPI_CMD_CTRL_COMMIT;
|
||||
*pSpiStat = SPI_STAT_COMMIT;
|
||||
|
||||
sputs("SYS_SPI_CTRL_STAT : ");print_word(*pSpiCtrlStat);sputs("\n");
|
||||
sputs("SYS_SPI_XFER_SIZE : ");print_word(*pSpiXferSize);sputs("\n");
|
||||
sputs("SYS_SPI_DATA_SIZE : ");print_word(*pSpiDataSize);sputs("\n");
|
||||
sputs("SYS_SPI_CTRL : ");print_word(*pSpiCtrl);sputs("\n");
|
||||
sputs("SYS_SPI_STAT : ");print_word(*pSpiStat);sputs("\n");
|
||||
|
||||
while(!(*pSpiCtrlStat & SPI_CMD_STAT_DOUTRDY))
|
||||
while(!(*pSpiStat & SPI_STAT_DOUTRDY))
|
||||
{
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
print_word(*pSpiData);sputs("\n");
|
||||
} while (*pSpiCtrlStat & SPI_CMD_STAT_DOUTRDY);
|
||||
} while (*pSpiStat & SPI_STAT_DOUTRDY);
|
||||
|
||||
sputs("Testing SDRAM (pattern)\n");
|
||||
for (j=0; j < ARRAY_SIZE(test_pattern); j++)
|
||||
|
||||
Reference in New Issue
Block a user