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: TMS570LC43x: SCI RX interrupt doesn't work

Other Parts Discussed in Thread: HALCOGEN

Tool/software: Code Composer Studio

Hello,

I'm working on a project around the TMS570LC43x Hercules Dev Kit. 

I used the following tutorial  to set up the SCI module. 

The problem is that the RX interrupt doesn't work:

-I start to send periodic serial data with Com Port Data Emulator in the virtual port via USB cable 

-I can see the RX SCI led light up

-Trying to put a breakpoint inside the interrupt sci function in Code Composer Studio, the running never stops

I also tried to receive data, whene interrupts are enabled, using sciReceive function but it doesn't work. 

  • Hello,

    1. The SCI module has two interrupt lines, level 0 and level 1. Level 0 has higher priority, and is called High Level interrupt in HALCOGen driver.

    2. Receive interrupts are enabled by the SET RX INT bit of SCISETINT register

    3. If the SET RX INT is set, a receive interrupt is generated when the SCI transfers newly received data from SCIRXSHF to SCIRD.

    If you use the driver generated through HALCOGen, you need to call sciReceive() first to set the length:

    g_sciTransfer_t.rx_length = length;

  • Thanks for the reply. I have already tried calling sciReceive() with the following code:

    But it doesn't work.

    Putting a breakpoint inside sci4HighLevelInterrupt, the running never stops.

    Also "command" is always empty even if I'm sending periodic serial data with Com Port Data Emulator. 

    What I am missing?

  • Hello,

    Two thing to check:

    1. Pinmux settings for SCI4 signals which are multiplexed with N2HET and EMIFsignals

    2. which interrupt line is used for SCI4 RX interrupt: high level or low level:  sciREG4->SETINTLVL 

  • Thanks for the reply. I solved the problem using sciREG1 but now there is another problem. 

    I can use the function "sciSend" to communicate with the terminal:

    - I used the function  "sciSend(sciREG1,1,(unsigned char *)"1"); to send the character "1"

    - but every time I send the character I observe a weird character in the terminal like "à" or "£"

    I set the baud rate to 9600 with HalcoGen and I made sure the terminal was also set to 9600.

    Any suggestions?

    Thanks in advance

  • It is most likely caused by the different baudrate or different stop bit.

  • I checked both but they match. 

    Could it be a problem with HalcoGen? Because the graphics are very confusing

    Or could it a be a vclk problem? I am attaching the function generated by Halcogen SciSetBaudRate

  • The code generated by HALCOGen should be fine.