This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
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
Hi Chaya,
receiver is not receiving the data
Can you please describe the missed data? Is there a pattern to the missed data (shifted, missing frames, etc.)? Can you clearly describe a case where data is transmitted and describe what data is received/what is missing? Are you able to see correct signals output on the SCI lines but not seeing the data correctly received into the RXBUF (RXEMU) register on the C2000?
Best Regards,
Allison
Hi,
From USB we will be transmitting commands with GUI, commands will get transmitted to TI experiment kit as a frame and frame starting with STX and ETX. Between STX and ETX the command word will be inserted and get transmitted.
Prefixed commands shall be transmitted from USB port as command frames and format of the command frame is shown below:
During our testing, a command "MD1" (4D 44 31) was transmitted to SCI port as given below:
The SCI is supposed to receive the data given above, and following are the observations:
Thanks & Regards,
Chaya
Hi Chaya,
Thank you kindly for the clear explanation and details. Please allow another day for me to review the information you provided. Appreciate your patience!
Best Regards,
Allison
Hi Chaya,
My apologies I will need another day to form a proper response here.
Best Regards,
Allison
Hi Chaya,
Sorry for the delay. Can you please clarify the baud rate you are using? What is your LSPCLK divider (what LSPCLK frequency are you running at) and what baud rate is the communicating device expecting? Since there is corrupted data upon receival by SCI, one speculation is it could be a timing mismatch. I would like confirmation if the waveforms always reflect correct data, but you are seeing incorrect data received in the SCI buffer (RXBUF/SCIRXEMU)
Best Regards,
Allison
Hi,
Baud rate we are using is 38.4khz. LSPCLK, we gave 150mhz (as we are writing 0x0079 into SCILBAUD register we are not using baud rate formula- ((LSPCLK/(BAUD_RATE*8))-1) as per manual).
But, by measuring for this 38.4khz in oscilloscope we are writing value for SCILBAUD as 0x0079.
Yes, waveforms are always reflecting correct data, but we are seeing incorrect data received.
Thanks & Regards,
Chaya
Hi Chaya,
Allison is currently out of office until after the holidays. Please expect a delay in response. Thank you for your patience.
Best Regards,
Aishwarya
Hi Chaya,
Apologies for the extended delay. Are you still facing this issue or have any further updates to provide on progress?
Thank you for the baud rate information. Can you please clarify the status of any RX error flags that you see upon incorrect receival?
Best Regards,
Allison
Hi,
Sorry for late response. Yes, we are still facing the issue.
We didn't check status of this flag, once we will check and update you.
Thanks & Regards,
Chaya