SCI works fine in loopback mode but in normal mode it doesn't

Sailesh

Apr 14, 2016
5
Joined
Apr 14, 2016
Messages
5
We implemented a SCI for TMS320F28835 TI microcontroller.
In loopback mode SCI working properly but when in normal mode it doesn't trigger receive
interrupt and even oscilloscope also not showing any signal on SCITx pin.

Micro controller supports 3 SCI for testing purpose we made connected SCI-B TX to
SCI-C Rx( Implemented device driver in which SCI-B will be sending some data and
SCI-C suppose to receive).

SCI-B TxINT is getting trigger when we sends but SCI-C RxINT doesnot triggering.
Even TXGpio also not showing of signal in oscilloscope.
SCI code is attached with post

Need help please reply if you have any idea about problem.
 

Attachments

  • sci_code.txt
    11.1 KB · Views: 184

Sailesh

Apr 14, 2016
5
Joined
Apr 14, 2016
Messages
5
Thanks Amar.

I used same pdf for implementing and its not working polling also I tried which is not working.
Baud rate 100K . BRR as 30

Do we have some range of Baud rate for SCI ?
 

Sailesh

Apr 14, 2016
5
Joined
Apr 14, 2016
Messages
5
I am trying with 115200 baud rate and BRR is 26. CPU freq 100MHZ.

Sorry in hurry and tension I have written wrong
 

Sailesh

Apr 14, 2016
5
Joined
Apr 14, 2016
Messages
5
I changed baud rate to 9600 and BRR is 0x144. CPU freq 100MHZ.

I tried with SCI adapter which connect with system's hyper terminal.
Ones I tried with RX INT and once polling but nothing is working.

I don't know whats going wrong ?
 

Attachments

  • sci_A - Copy.txt
    3.2 KB · Views: 81

Amar Dhore

Dec 2, 2015
129
Joined
Dec 2, 2015
Messages
129
in here:
void SciA_Transmit(int data)
{
while (SciaRegs.SCIFFTX.bit.TXFFST != 0) {} //Why are you doing this??

// Check if TXRDY is high
SciaRegs.SCITXBUF=data;
//wait for TXRDY to go low

}



Few more things:
1. Enable TXENA
2. Write to SCITXBUF, then the transmitter is no longer empty, and check if TXRDY goes low.
3. If TXRDY goes low, then transmission w2as successful, you can transmit the next byte.
4. I am not sure if yo have to set TXWAKE before you Transmit. Check the specs.
 

Sailesh

Apr 14, 2016
5
Joined
Apr 14, 2016
Messages
5
Thanking you for great support.

Problem was EALLOW was needed for GPIOs

like below:

void Gpio_SciA_init(void)
{
EALLOW;
GpioCtrlRegs.GPBPUD.bit.GPIO35 = 0; // Enable pull-up for GPIO22 (SCITXDA)
GpioCtrlRegs.GPAPUD.bit.GPIO28 = 0; // Enable pull-up for GPIO23 (SCIRXDA)

GpioCtrlRegs.GPAQSEL2.bit.GPIO28 = 3; // Asynch input GPIO23 (SCIRXDA)

GpioCtrlRegs.GPBMUX1.bit.GPIO35 = 1; // Configure GPIO29 for SCITXDA operation
GpioCtrlRegs.GPAMUX2.bit.GPIO28 = 1; // Configure GPIO28 for SCIRXDA operation
EDIS;
}
 
Top