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.

RTOS: uartecho_MSP_EXP432P401R_tirtos_ccs Simple link Not Working

Tool/software: TI-RTOS

Hello,

Recently I switched to simplelink.

I've tried the uartcho but the code stacks at:

UART_write(uart, echoPrompt, sizeof(echoPrompt));

I use simplelink 1.30

Thank you for your help.

  • Can you please give some more details? Did you import the UART Echo example from the 1.30 SDK? What's not working: building, loading, running, etc.?

    Todd
  • Hi Todd,

    I've imported the 

    uartecho_MSP_EXP432P401R_tirtos_ccs

    example, I didn't change anything and the code hands on write to com port.

  • We have not seen this problem before. Can you please let us know the following versions
    - CCS (or IAR)
    - XDCtools
    - Windows (or whatever host you are using)
    - Compiler

    What terminal program are you using (e.g. puTTY, etc.)? Have you read the readme.html in the project to make sure you have the right baudrate, etc.

    Todd
  • -CSS: Version: 7.1.0.00016
    -XDS110
    -iMac osX
    -TI v16.9.1 LTS

    As fas as I understand the terminal version or if the wire of the com port are connected does not matter.

    The uart write should work.

    I've tried also changing the com port but is the same.

    Before using simple link I didn't have any problems with the uart.
  • We'll confirm it is working on osX. In the meantime, can you look at Tools->ROV->Task->CallStacks and see the call stack for the echo task?

    Todd
  • Thank you for the fast response.

    This is what I have so far.

    The break code on while is never reached.

  • Can you set a breakpoint at the first UART_write and first UART_read in the mainThread function. Then attach the ROV->Tasks->CallStacks picture when you hit the first breakpoint is hit. For example:

    Then resume. From what you are saying, you will not hit the UART_read. Please Suspend the target (Alt-F8) and get the same picture. I want to see what call the UART_write is blocked on.

    Todd

  • First break on write:

    On resume:

    It seams to be the same stack data.

    I've also tried to put the second break point on read, but is the same..

  • I have no idea why this is not working? Are other examples working? Do you have another LaunchPad you could try this on? Do you have the watchdog disabled (the gel file in CCS usually turns it off).

    Can you remove all the breakpoints, reload the program and run it. Then suspend it and post the CallStack view from ROV again.
  • I've attached a brand new MSP432, created a new workspace imported the uart example.

    The code still does not reach the read part in the while code.

    Below are 3 screenshots of running and pausing (as I see the threads seams to be running)

    I really nead the UART :/

    All other examples that I've tried(Sd, spi, basic one) are working.

    Thanks!


  • This back trace makes more sense. The UART_write is blocked on a semaphore waiting for the ISR to run and post the semaphore. Now the question is why isn't the ISR running. How are you connecting to the LaunchPad...via the USB on the board? There should a back-channel UART in that USB connection. Can you confirm you are seeing it on your mac. In Windows I'd look a Device Manager and see the two ports: one is for emulation (COM6 in this case) and the other is the back-channel UART (COM5 in this case):

    Did you change any jumpers on the LaunchPad?

  • I have connected the tx and rx together(loop) right now for the test, unfortunately right now it's not possible to get to work the uart debugger on mac(there is a bug, you can only select COMX as a option but on mac com ports are recognised as tty.uart..) As a workaround I have connected another PC over ttl->usb adapter when I need it.


    But I'm quite sure that the problem is in the software. 

    This is my latest test results: 

    Test 1: 

    TI-RTOS for MSP432x -> Ti driver Examples -> UART Examples -> UART Echo.

    Everything works, the program writes the echo prompt and goes to while loop where it loops like it should(I have a jumper on tx-rx)

    Test 2:

    simplelink_msp_432_sdk_1_30_00_40 -> MSP_EXP432P401R -> drivers -> uartecho -> tirtos -> css

    The program hangs like I've already wrote.

    So the problem is not in the hardware or at least not in the board.

    Now is the problem in the simplelink driver or mac? I don't know :/

    Thank you for the help

  • Hi,

    I have been able to run the code successfully on my mac.  Here are the steps I follow to run the example:

    1. Open CCS & import a fresh copy uartecho example following the documented procedure.
    2. Ensure emulation, RXD & TXD pins are jumper-ed on the launchpad.  This makes sure the UART peripheral on the MSP432 is connected to the mac via the emulator (follow the jumpers shown in the Board.html file).
    3. Build the example & load it into the MSP432 device.
    4. Open a Terminal window & run the following command: "~$ ls /dev/tty*".  This will show a complete list of all of the TTY devices connected to your computer.  As you stated above, the UART port will enumerate as "tty.usbmodemM432*".  The XDS110 emulator actually creates two instances; you always want to use the lowest numbered.

    5. In the same terminal window use the screen program for serial communication.  I use the following command: "~$ screen /dev/tty.usbmodemM4321001 115200".
    6. Run the example.  You should be able to type characters into the screen session you created & see them echoed back on the screen.
    7. Once complete use the following commands to exit the screen session: "ctrl+a" then the letter "k".  Then just confirm you are exiting the screen session.

    Let me know if this helps,

    -- Emmanuel

  • Hi Emmanuel,

    Thank you for the detailed response.
    Can you please tell me your osx version, ccs version and the simplelink version?

    I've imported the example in the console I'm able to see 2 com ports and to listen to it, but unfortunately the program still hangs on first write.

    I've tested the example on mac book pro and also on IMac. On both I've tried a fresh install + with a new msp432 board.


    thank you
  • Emmanuel is out today. He'll respond tomorrow.

    Todd
  • Thank you,

    I found out that the write function hangs after the first character was send. 

    I'm attaching the screen shot below:

    There must be a problem in the lib.
    Hopefully we can solve this problem, this is the last thing that i need to implement before going to production.

    Miha

  • Hi,
    Anything new maybe?

    Thank you for the help

**Attention** This is a public forum