Part Number: TMS320F28335
Tool/software: TI C/C++ Compiler
Hi Sir,
The DSCs has a serial port because the peripheral needs to change from interrupt mode to non-interruptive transmission and reception mode. There is no use of FIFO. The data sent out is available.
The received data can also be observed with an oscilloscope. The "RX" mark cannot be read! Not sure what the problem is and would like to ask for suggestions.
![]()
*Schematic: Color is the motherboard side, black & white is the communication board side, WK2132 is a serial port 1 to 2 device.
![]()
*Waveform: Blue is sending 0x40, yellow is receiving 0xf0.
Initialization code:
---------------------------------------------------------------------------------------------
void scib_init(void)
{
/*����B����*/
ScibRegs.SCICCR.all =0x0007; // 1 stop bit, No loopback
// No parity,8 char bits,
// async mode, idle-line protocol
ScibRegs.SCICTL1.all =0x0003; // enable TX, RX, internal SCICLK,
// Disable RX ERR, SLEEP, TXWAKE
ScibRegs.SCICTL2.bit.RXBKINTENA = 0; //�����ж�ʹ��
ScibRegs.SCICTL2.bit.TXINTENA = 0; //�����жϲ�ʹ��
ScibRegs.SCIHBAUD =0x0000;
//ScibRegs.SCILBAUD =0x0028;// 115200 baud @LSPCLK = 37.5MHz.
ScibRegs.SCILBAUD =0x0051;// 57600 baud @LSPCLK = 37.5MHz.
ScibRegs.SCIFFTX.all = 0x0000;
ScibRegs.SCIFFRX.all = 0x0000;
ScibRegs.SCIFFCT.all = 0x00;
ScibRegs.SCIFFTX.bit.TXFFINTCLR = 0;
ScibRegs.SCICTL1.all =0x0023; // Relinquish SCI from Reset
}
void scib_xmit(int a)
{
while (ScibRegs.SCICTL2.bit.TXRDY == 0) {};
ScibRegs.SCITXBUF = a;
}
int scib_receiv(void)
{
while (ScibRegs.SCIRXST.bit.RXRDY == 0) {};
return ScibRegs.SCIRXBUF.bit.RXDT;
}
Best Regards,
Roy Chen