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: Simulink SCI transmit disable

Part Number: TMS320F28027

Hi,

I'm using simulink to program TMS320F28027 microcontroller.

Each second a two bytes buffer is being sent to SCI transmiter (the function called by interruption INT9.2 is empty).

I would like to send the data only when I want, not periodically (p.e. when a switch is on, etc). I don't know how to do so because in Sample time you must put a real number.

Any ideas?

Thank you very much.

PD: do not take into account ADC-PWM Synchronization via ADC Interrupt.

  • Please allow us some time to have someone from Mathworks help with an answer on this thread

    Sean
  • Hi,

    I have asked some colleagues internally for suggestions, but they are on vacation and I don't know when I will receive an answer.

    For immediate assistance, I suggest you contact MathWorks Technical Support.

    -Brian

  • Roger,

    I don't see your switch or any input in your model. By switch do you mean you want to trigger your model via an GPIO? please be more clear. I have run the same model and will be able to help you out.

    --Kash

  • Hi Kash,

    Yes, via GPIO. But my point is to not trigger it periodically. So if you know how to send the data only once after X ms of start, that would be good for me too.

    The image below shows an example where the buffer is sent when one of the GPIOs is 0. When not, a 0 vector is sent. I would like to send nothing instead of a 0 vector.

    Thanks!

  • Roger,

    If you don't want to send anything when your system is not triggered, you need to put the "SCI XMT" block inside a triggered sub-system. Otherwise it keeps sending the last value stored in the buffer, check this example out:

    When GPIO is triggered, the sub-system gets triggered too and it sends out the vector [1 2], but when the GPIO is not triggered, the "SCI XMT" block inside the triggered sub-system won't send anything out.

    If you want to transmit a vector let's say every "X" second, you can easily create an Stateflow to trigger and output every "X" second:

    Hope it helps,

    --Kash

    If my post answered your questions, please click on "Verified Answered" button.

  • Thank you!