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.

Starterware/AM3352: In "uartEcho.c" this application how data is Echo back by application

Part Number: AM3352

Tool/software: Starterware

Hi All,

- The Application present in "AM335X_StarterWare_02_00_01_01/examples/evmAM335x/uart/uartEcho.c" file, has two features Mentioned in Comments.

      Running the Example:
           On executing the example:
           1) A string is displayed on the serial console of the host machine.
           2) The user is then expected to key in data on the serial console.
              The keyed in data are immediately echoed back by the application
              and are visible on the serial console.

- first feature is i am understanding.

Question: The 2nd feature of the application code is i am not finding entire code (Sorry for stupid question)?.


- Please specify the Code for the 2nd feature of uartEcho.c file, where the echoed back code present?

 

Regards,

Vamsi.

  • Hi All,

    Can any one tell, where the code present in the below feature.
    "The user is then expected to key in data on the serial console.
    The keyed in data are immediately echoed back by the application
    and are visible on the serial console" in uartEcho.c file

    - I need a speed response of you.

    Regards,
    Vamsi.
  • Singamsetty,

    Its located at C:\ti\pdk_am335x_1_0_5\packages\ti\drv\uart\example\sample\src\main_uart_example.c in the uart_test() function.

    Lali

  • Hi Lalindra,

    Thanks for prompt reply,

    Please Understand my question,

    "AM335X_StarterWare_02_00_01_01/examples/evmAM335x/uart/uartEcho.c"


    - Currently "AM335X_StarterWare_02_00_01_01" SDK,   

    SOC:AM3352

          Running the Example:
               On executing the example:
               1) A string is displayed on the serial console of the host machine.
               2) The user is then expected to key in data on the serial console.
                  The keyed in data are immediately echoed back by the application
                  and are visible on the serial console.

    Here, i am understanding the code of "uartEcho.c" file, 

     1) A string is displayed on the serial console of the host machine,  This code i found on uartEcho.c file.

    2) The user is then expected to key in data on the serial console. The keyed in data are immediately echoed back by the application and are visible on the serial console.

    -- The 2nd Feature code i am not able to find.

    - I checked and understand the driver file of Uart "AM335X_StarterWare_02_00_01_01/driver/uart_irda_cir.c" file. i am not found any loop back code here. 

     

    - Previously your suggested answer is not my SDK " C:\ti\pdk_am335x_1_0_5\packages\ti\drv\uart\example\sample\src\main_uart_example.c in the uart_test() function." 

    -- Please specify the code for, how 2nd feature is working.

     

    Regards,

    vamsi

     

  • Vamsi,

    This loop inside main() is the key here:

           while(numRdBytesISR < 8)

           {

           }

    I would advise you to put breakpoints in your code and follow along.

    Also, please also check what's going on inside UARTIsr() with regards to UARTCharPutNonBlocking() and UARTCharGetNonBlocking.

    Lali

  • Hi Lalindra,

    Thanks for Suggest answer.

    - I have a query, In starterware s/w, "ioremap" like any API is there, to convert the physical address to Virtual address.
    Regards,
    Vamsi.
  • Vamsi,
    Please open another thread for this question as it is not related to this thread.

    Lali