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.

RM57L843: UART RX help

Part Number: RM57L843

I am looking for a way to use UART input to command the normal execution of my program. I want the program to operate normally, but be "listening" for UART input data.

Is there a way to trigger an RX interrupt without calling sciReceive()? I have figured out that it is possible to check sciIsRxReady() prior to calling an sciReceive() method, but I am searching for a way to trigger the RX interrupt when input is received in the terminal, rather than looping and checking a flag to determine if an input has been received.

Is this possible? Or will I have to constantly check the sciIsRxReady flag to determine something has been received in the UART?

  • Hello Josh,
    sciReceive function actually does not trigger an interrupt. Interrupt is generated when RXRDY flag is set (RX interrupt must be enabled). When data is received and moved from shift register to receiver data buffer, RXRDY flag is set and indicates that new data has to be read. If RX interrupt is enabled (SET RX INT bit in SCISETINT register) then when RXRDY flag is set, interrupt is generated. You could refer to Section 29.3.2 in device TRM:
    sciReceive just set-up receive.The following is copied from function declaration.

    "In interrupt mode receive is setup and
    * the routine returns immediately, sciReceive must not be called
    * again until the transfer is complete, when the sciNotification
    * callback will be called."

    After you have received all data then you should call sciReceive to prepare SCI for new receive operation. This could be done in sciNotification.

    Best regards,
    Miro