Unable take input from USART - FreeRTOS - AT3

anonymous wrote on Wednesday, April 06, 2011:

Hi Geeks,

Just trying my hands on FreeRTOS. Following are my setup -

Micro-controller - AT32UC3A0512
Board - EVK1105
Using FreeRTOS
Environment - AVR Studio 5 with ASF latest 2.3 framework
I just created a new project from Example project FreeRTOS. I am checking the USART currently. When run the example project, I am able to transmit characters from my development board to PC through USART but when I type or input something on my PC usart terminal program(using Putty), I am not able to see anything. Can anybody suggest what may be wrong? Or do I need to change the code in the current example code to get input and display on my terminal program for USART?


rtel wrote on Wednesday, April 06, 2011:

Presumably that is example code you got from Atmel?

Are the UART Rx interrupts enabled?  Is there an interrupt handler installed?  Or are you just polling the UART?


anonymous wrote on Thursday, April 07, 2011:

Actually I am not able to understand the code itself. I am really sorry for that. If someone can help I would be glad.
I am just using the FreeRTOS example. As I saw the code, In the main function we are calling calling a fuction


and it creates two tasks for TX and RX from the UART in comtest.c.  Now TX works fine for me. When I look at the


it uses the function

xSerialGetChar( xPort, &cByteRxed, comRX_BLOCK_TIME )

which is a blocking function call. In the demo there is instruction that I have to loopback the TX and RX pin of UART to get result. But my question is if I don’t use loopback and just want to get some text from the UART terminal on my PC (Putty software) should I able to do it? I am changed the code in

static portTASK_FUNCTION( vComRxTask, pvParameters )

to display the character after I receive it from the UART terminal of PC. Please somebody give some solution…

davedoors wrote on Thursday, April 07, 2011:

When you connect the UART to putty, can you see the characters being transmitted from the hardware to putty? If not then it could simply be a cabling problem, or a baud rate problem. Loopback tests will work even if the baud rate is not set correctly because both the receive and transmit will be using the same (incorrect) baud.