我在改写spi的程序的时候总是发生hard fault,我调试的时候发现,停在write处,这是为何,它怎么不去write?
while(1)
{
/* Write to TX register */
SPI_WRITE_TX(SPI0, g_au32SourceData[u32DataCount]);
/* Check SPI0 busy status */
while(SPI_IS_BUSY(SPI0));
/* Read received data */
SPI_READ_RX(SPI0);
u32DataCount++;
if(u32DataCount == TEST_COUNT)
break;
}
|