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.

LAUNCHXL-F28379D: SCI Communcation Problem with Matlab

Part Number: LAUNCHXL-F28379D


Hi everyone,

I have a problem with MATLAB to transmit/receive data. Actually, considering transmit, everything is OK. But, receiving block does nont work perfectly. Because, I couldn't read whole data which I sent. Although I just want to read 100Byte data, it only reads 15Byte. I shared my problem below as a picture:

when functions commented out, display shows the data package

when functions are working displays won't work

when scope working connection goes timeout.

Thanks for everything.

Sincerely,

Fethi.

  • Hi Fethi,

    I've notified Mathworks support; they should be able to help you out.

    Some clarifications/debug experiments that might help:

    • Did you verify that the SCI baud rate is correct at the pins by scoping the data as it goes by?  
    • If you significantly reduce the baud rate, does the rx function correctly?
    • What are you connecting to and via what protocol?  Is this just with CMOS levels directly to something else on the board, through an FTDI virtual COM port, or through something like an RS-232 or RS-485 transceiver?  

  • Hi,

    When you read in polling mode are you giving enough time for the step function to read all 100 bytes? If the SCI baud rate is not adequate enough for the given sample time, then you may not be able to receive and read 100 bytes in the given step time.

    The best way to handle this situation is to use the SCI FIFO feature. You can configure the SCI Tx block to interrupt when FIFO level is zero, then load 16 words of data and come out of the interrupt. Accordingly you can enable the SCI FIFO Rx interrupt and set the level to 16. When RX FIFO receives 16 words of data, the Rx interrupt can be used to read the same. This ensures perfect synchronization between Tx and Rx blocks.

    You can find an example where we enable FIFO operation on the SCI Rx block in one of our shipping examples.

    c28379Dpmsmfocdual_cpu1_ert/Serial Receive

  • Hi,

    We tried every sampling time to catch all data. Unfortunately, it doesn't work. Also, we tried FIFO in SCI blocks (In these blocks, we can max. 4 FIFO because of C2000 series.).

    Actually, we didn't use rate transition and IRQ (Hardware Intrerrupt). We gonna try this week. Then, I will give an information about last situation.

    Sincerely,

    Fethi.

  • Hi Fethi,

    Were you able to get this to work?  If not, what is the current state of the debug?

  • Hi Devin;

    Unforutanely, it doesn't work. I donwload example which you suggested, it is not fully related with my desired point. I want to read uart data  just only 100Byte. I have 12 motors and these motors communicate with UART (TTL). Also, I tried to read (DSP) RX - (DSP) TX instead of using motor. When I connect motor I have already similar problem.

    Thanks.

  • Hi,

    Let me know if you contact our support.

    We may need your model to debug.

  • Sorry for my message late. Today, I sent to Mathworks Service about this problem. I am waiting for solving now.

  • Hi Fethi,

    Due to the age of the thread, I'm going to mark this as resolved.  If your issue is not resolved by Mathworks, feel free to reply to this thread or use the 'Ask a related question' button to continue the discussion.