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.

TMS320F28027: SCI Disable ?

Part Number: TMS320F28027
Other Parts Discussed in Thread: MOTORWARE

Hello Gurus, 

I am using the SCI loop back mode to collect information through SCI using teraterm. I am using both Gpio 28 and 29. I am getting the data correctly. 

What I was wondering is that once I am done with the input of data I want to turn off the SCI interface and use the gpio 29 as a general purpose. 

I do the following :

1. receive data from sci, write to flash. 

2. set Gpio 29 back to general purpose 

GPIO_setMode(obj->gpioHandle,GPIO_Number_29,GPIO_29_Mode_GeneralPurpose);
GPIO_setLow(obj->gpioHandle,GPIO_Number_29);
GPIO_setDirection(obj->gpioHandle,GPIO_Number_29,GPIO_Direction_Output);

3. pull Gpio High. 

I am able to pull the gpio high and low, but I can still see on my teraterm that I am getting some transmission. So, I tried to do the following after setting the Gpio back to general purpose:

SCI_disable(mySci);

SCI_disableTx(mySci);
SCI_disableRx(mySci);
SCI_disableTxInt(mySci);
SCI_disableRxInt(mySci);

But I achieve no success from this. So, my question is how do I completely turn off SCi from for my device?

Regards,

Rajan Joshi

  • Hi Rajan,

    Are you able to attach any waveforms of what is on the pin? What values are you seeing in Tera Term?

    Simply switching to GPIO mode should prevent any SCI transmissions on those pins. If you can toggle the GPIO pins through the Gpio data registers, then SCI signals are not coming out of those pins. In addition you have disabled the SCI, so I suspect the issue may not be with the C28x device.

    The only things to check would be to step through the code and make sure the writes are taking effect (in case an EALLOW or something is missing).

    Regards,
    Kris
  • Rajan,

    IF you are using GPIO 28 and 29 to connect to Tera Term over SCI, then i think i see your problem. since these pins are still connected to your PC, Tera Term is interpreting you pulling the GPIO low and high as you sending data. You would have to physically disconnect those GPIOs from the PC to not see this occur.

    Regards,

    Vince Rodriguez
  • Kris, 

    I think in my motorWare code I was setting it as a general purpose in a while wait loop. So, I was getting a square wave form of 60MHz. By stepping through it I realized this. 

    Vincent, 

    I am using both those GPIOs to connect to teraterm. As mentioned above the problem was actually software and where I was calling the GPIO functions. 

    Thank you both for your valuable inputs. 

    Regards,

    Rajan Joshi