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: TMS320F28027 Checking whether SCI communicattion has occured

Part Number: TMS320F28027
Other Parts Discussed in Thread: CONTROLSUITE

Dear all;

I am studing on TMS320F28027. I am trying to make a communication between two TMS320F28027 via SCI port. One of them will recieve data which is not important what it is. The other one will check if transmitter is sending data or not. İf it is sending data, reciever TMS320F28027 will create PWM. İf transmitter stop sending signal, reciever will stop PWM generation. I am thinking on it how to make reciever check whether transmitter is transmitting data. Is it possible that checking start bit is recieving on GPIO DATA REGS or how do I make PWM stop if there is no recieving data?

Regards

Fahri 

  • Hi Fahri,

    This is very simple to implement. All you need to do is keep checking the Slaves 'RxBuf' register for the valid data. If valid data turn on PWM else off!
    You need to first get the 2 controllers to communicate with each other. Refer SCI example codes present here:
    C:\ti\controlSUITE\device_support\f2802x\v230\f2802x_examples_structs

    Regards,
    Gautam

  • Hİ Gautam
    There is no specific data to keep PWM on. Thus, I do not have a data to compare it. Transmitted data may change, but if master transmit any data, slave will keep generating PWM. İf there is no recieved data, slave must end up the pwm generetion. And in SCI referance guide, it is written that SCIRXBUF is cleared by a system reset. At that condition, how do I garantee that I am not reading old data. I have no opportunity about entering lab and checking my program, so I want to ensure the code is working without problem.
    Thank you
  • You can use (SCI) interrupts to check whether the data is the latest one or not. Check the respective flags to keep the track on data.
  • Hi Gautam
    I have succeed about SCI transmission but I have a question. For the first try, Idid not add that code and I observed it was not transmitting;

    SciaRegs.SCICTL1.all =0x0023; // Relinquish SCI from Reset

    However, when I added it, my code start to transmit. I am wondering that how it works. I do not understant how and from where SWRESET signal is created. I obseved that adding it is necessary, but why?

    Would you mind if I want you to explain it?

    Thank you
    Fahri
  • user4594266 said:
    However, when I added it, my code start to transmit. I am wondering that how it works. I do not understant how and from where SWRESET signal is created. I obseved that adding it is necessary, but why?

    Did you go through this register? If you check your SCI init SWRESET would be initialized to 0 ie SCI is held at reset.

    SciaRegs.SCICTL1.all =0x0003;

    and then then the registers get initialized and finally we need to Relinquish SCI module from Reset :

    SciaRegs.SCICTL1.all =0x0023;

    Regards,

    Gautam