void ADTEST() { /* DMA configuration*/ DMAconfig(); GPIO_CLR_DATA45 = 0x00000004;//clear the sync signal SPICONFIG(); SECR = 0x00004000; //clear the recieve event ICR |= 0x00000001; //clear the flag EVMOMAPL137_waitusec(1000);
GPIO_SET_DATA45 = 0x00000004;//set the sync signal high
SPI_SPIINT = 0 | ( 1 << 16 ); //DMA enable EESR = 0x00004000; while((IPR & 0x0000001) == 0);//wait for the end of recieve SECR = 0x00004000; ICR |= 0x00000001; GPIO_CLR_DATA45 = 0x00000004; SW_BREAKPOINT; }
这是AD的一个测试程序 搞不明白为什么是0x00000004设置和清除singal
|