while(SPI0->CNTRL.GO_BUSY == 0)//当SPI数据传输完毕时
{
printf("GO_BUSY is %x \n",SPI0->CNTRL.GO_BUSY);
printf("TX_EMPTY is %x \n",(SPI0->CNTRL.RESERVE1)&0x04);
SPI0->TX[0] = 0x01;//把数据写入tx缓冲中
printf("TX_EMPTY is %x \n",(SPI0->CNTRL.RESERVE1)&0x04);
SPI0->CNTRL.GO_BUSY = 1;//此位写一开始数据传输
printf("GO_BUSY is %x \n",SPI0->CNTRL.GO_BUSY);
}
主函数中循环发送数据 |