[DSP280x EVM]시리얼포트 드라이버를 포팅하고 송 수신 테스트를 완료 했다.
main()
{
Uart0Init();
Uart0Puts(" DSP280x EVM Serial Test!\r\n");
Uart0Puts(" - by http://cafe.naver.com/elab.cafe\r\n");
Uart0Puts("\r\nSend Any Char..\r\n");
for(;;)
{
Uart0PutChar(Uart0GetChar());
}
}
void Uart0Init(void)
{
// Test 1,SCIA DLB, 8-bit word, baud rate 0x000F, default, 1 STOP bit, no parity
// Note: Clocks were turned on to the SCIA peripheral
// in the InitSysCtrl() function
SciaRegs.SCICCR.all =0x0007; // 1 stop bit, No loopback
// No parity,8 char bits,
// async mode, idle-line protocol
SciaRegs.SCICTL1.all =0x0003; // enable TX, RX, internal SCICLK,
// Disable RX ERR, SLEEP, TXWAKE
SciaRegs.SCICTL2.all =0x0003;
SciaRegs.SCICTL2.bit.TXINTENA =1;
SciaRegs.SCICTL2.bit.RXBKINTENA =1;
SciaRegs.SCIHBAUD =0x0001; // 9600 baud @LSPCLK = 20MHz.
SciaRegs.SCILBAUD =0x0044;
SciaRegs.SCICTL1.all =0x0023; // Relinquish SCI from Reset
scia_fifo_init();
}