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.

CCS/RM46L852: RM46L852

Part Number: RM46L852


Tool/software: Code Composer Studio

Hi

I have an application where I receive a string of characters as a command and then do some activity as per the received command and then send reply to that application. I have enabled SCI Rx interrupt. The problem that I am facing is when I send the command from the application to my controller, it is not able to receive the command for the first time but works well when the command is sent again i.e from the second time onwards.  In short, controller is not receiving the command for the very first time and then it is able to receive and respond to any command for any number of times. But when I run this in debug mode, I am not facing any such issue. I can receive the command for the first time also in debug mode but not in normal mode. Can someone help me in solving this 

  • Hello,

    The sciReceive(..) has to be called first to set the length and location for the receiving data. 

    /** - Enable IRQ interrupt */
    _enable_IRQ();

    /** - Initialize SCI Routines to receive Command and transmit data */
    sciInit();  //RX interrupt is enabled, VIM channel 13 or 27 is enabled (for LIN/SCI2)

    /** - Configure SCI to receive 8 bytes of Command information */
    sciReceive(sciREG2, 8, receive_command);  //get ready to receive the command