Tool/software:
Hi,
For our Project requirement we want to convert the USB data to TTL form. In order to achieve this, we are using DEVICE: TMS320F28335.
We are using USB to TTL converter. TTL output is connected to the SCI B port of 28335 controller card.
The receiver configuration is done as per the steps given in particular link (2.3 Configuration issue symptoms --- Cause 2)
In spite of that it is observed that transmitter is transmitting the data without any missing data, were as receiver is not receiving the data and please find attached code which we developed for this particular purpose. Can you please look at our code and fix problems if any.
and also attaching waveform which seeing in TTL side rx pin :
void Sci_Config() { EALLOW; SysCtrlRegs.PCLKCR0.bit.SCIBENCLK = 1; // enabiling peripheral clock EDIS; EALLOW; GpioCtrlRegs.GPAPUD.bit.GPIO18 = 0; GpioCtrlRegs.GPAPUD.bit.GPIO19 = 0; EDIS; ScibRegs.SCIFFRX.bit.RXFFIENA = 0; ScibRegs.SCIFFTX.bit.TXFFIENA = 0; ScibRegs.SCIRXST.bit.FE = 0; ScibRegs.SCIRXST.bit.OE = 0; ScibRegs.SCIRXST.bit.PE =0; ScibRegs.SCICTL1.bit.RXERRINTENA = 0; ScibRegs.SCICTL2.bit.RXBKINTENA = 0; ScibRegs.SCICTL2.bit.TXRDY = 0; ScibRegs.SCICTL1.bit.SWRESET = 1; ScibRegs.SCIFFTX.bit.TXFFINTCLR = 1; ScibRegs.SCIFFRX.bit.RXFFINTCLR = 1; ScibRegs.SCIFFRX.bit.RXFFOVRCLR = 1; ScibRegs.SCIFFTX.bit.TXFIFOXRESET = 0; ScibRegs.SCIFFRX.bit.RXFIFORESET = 0; ScibRegs.SCIFFTX.bit.TXFIFOXRESET = 1; ScibRegs.SCIFFRX.bit.RXFIFORESET = 1; ScibRegs.SCICTL1.bit.TXENA = 0; ScibRegs.SCICTL1.bit.RXENA = 0; ScibRegs.SCIFFTX.bit.SCIRST = 1; ScibRegs.SCICCR.all = 0x0007; ScibRegs.SCIHBAUD = 0x0000; // Setting the baud rate (high register) ScibRegs.SCILBAUD = 0x0079; ScibRegs.SCICTL1.bit.TXENA = 1; ScibRegs.SCICTL1.bit.RXENA = 1; ScibRegs.SCICTL1.bit.SWRESET = 1; ScibRegs.SCIFFTX.bit.TXFFIL = 4; ScibRegs.SCIFFRX.bit.RXFFIL = 4; ScibRegs.SCIFFTX.bit.SCIRST = 1; ScibRegs.SCIFFTX.bit.SCIFFENA = 1; ScibRegs.SCIFFTX.bit.TXFIFOXRESET =1; ScibRegs.SCIFFRX.bit.RXFIFORESET =1; ScibRegs.SCICTL1.bit.TXENA = 1; ScibRegs.SCICTL1.bit.RXENA = 1; ScibRegs.SCICTL1.bit.SWRESET = 1; EALLOW; GpioCtrlRegs.GPAQSEL2.bit.GPIO19 = 3; // Asynchronous input (SCIRXDA) GpioCtrlRegs.GPAMUX2.bit.GPIO18 = 2; //config gpio as SCITXDA GpioCtrlRegs.GPAMUX2.bit.GPIO19 = 2; //config gpioas SCIRXDA EDIS; }
Thanks & Regards,
Chaya