大家好,我现在使用TMS320F28335,使用Mcbsp作为SPI,我参考了v120\DSP2833x_examples\mcbsp_spi_loopback\Example_2833xMcBSP_SPI_DLB,里面有个延时我不是很明白
for(;;)
{
mcbsp_xmit(sdata1,sdata2);
while( McbspaRegs.SPCR1.bit.RRDY == 0 ) {} // Master waits until RX data is ready
rdata2 = McbspaRegs.DRR2.all; // Read DRR2 first.
rdata1 = McbspaRegs.DRR1.all; // Then read DRR1 to complete receiving of data
if((rdata2 != sdata2)&&(rdata1 != sdata1)) error( ); // Check that correct data is received.
delay_loop();
sdata1^=0xFFFF;
sdata2^=0xFFFF;
asm(" nop"); // Good place for a breakpoint
}
Delay_loop();是延时2个SRG周期,这个在MCBSP初始化时要延时,而正常使用时每发送接收一组数据也要延时2个SRG周期才能进行下一组数据的延时吗?期待你们的回复,谢谢!
|