9 years, 9 months ago.

Tera Term - problems

Hello,

I would like to know why the tera term do not presents the execution of a code immediately when I connect to the serial port.

I only got some return when I press "send break" on the interface, like the image attached.

Please!!! Someone can help me?

/media/uploads/mjq/break.png

/media/uploads/mjq/break2.png

Question relating to:

Example PWM control of RGB LEDs Freedom, Freescale, pwm, rgb

If still stuck: Ensure flow control is disabled in TeraTerm.

posted by Paul Russell 05 Feb 2015

3 Answers

9 years, 9 months ago.

Consider this: You are using USB to emulate a UART. On powering up the MCU, the PC will enumerate a UART (COM device) attached to USB, and map it to a device. By the time Windows has enumerated the device & established a link from the virtual serial port to Tera term, your MCU code has already finished printing it's string of characters & terminated. I'd suggest you establish a loop in main(), and ideally look for a '\r' to be received on the serial port. Whenever '\r' is received, you can respond with your "hello, world\r\n" string.

Good luck.

Accepted Answer

Thank you for your help, R. Main. I thought in this possibility too. I added a loop in main, but it happened the same thing again: nothing returned. Perhaps this really is the problem ... but unfortunately has not yet been solved. =(

posted by jane queiroz 04 Feb 2015
9 years, 9 months ago.

Suggestion: use \r\n instead of only \n and check the results.

Suspecting that Teraterm is not configured correctly but here are on topic threads:

http://ttssh2.sourceforge.jp/manual/en/menu/setup-terminal.html

http://developer.mbed.org/forum/mbed/topic/152/?page=1#comment-574

Thank you for your help, but I make the configurations on tera term according with this https://developer.mbed.org/handbook/Terminals and I think this is not incorrect. I checked this configuration repeatedly...

posted by jane queiroz 04 Feb 2015

Jane - did you apply the following in the setup of Teraterm ?

Setup New-line format (to print out new line characters correctly) •Setup -> Terminal... •Under "New-line", set Receive to "LF"

posted by Sanjiv Bhatia 04 Feb 2015

Yes, I did this configuration too. But anyway, if I don't press the "send break" or the "Del", nothing happens.

posted by jane queiroz 04 Feb 2015

See here:

Pause time while the break signal is sending to the serial port

When the break signal is sent to the serial port, the default pause time is 1000 msec. To change the pause time, edit change the SendBreakTime entry in the [Tera Term] of the setup file. SendBreakTime=2000

Default: SendBreakTime=1000

From this webpage: http://ttssh2.sourceforge.jp/manual/en/setup/teraterm-com.html

(last topic on the webpage)

perhaps related to a buffering / timeout issue of the FIFOs (buffers) so the above is worth testing. Try smaller delays.

Also, another idea is to try the use of pc.putc

https://developer.mbed.org/forum/mbed/topic/3191/

posted by Sanjiv Bhatia 04 Feb 2015
9 years, 9 months ago.

Once terra term has started up and established the USB serial connection pressing reset on mbed should result in all characters showing on screen. When you send a 'break' the interface on the mbed will actually also reset the target processor and make it restart just as when you would press the reset button yourself.

Hello Wim, thank you for your help too. Yes, the reset button, the "Del" button and the "send break" do the same thing: activate the program or call the data from the buffer.

posted by jane queiroz 04 Feb 2015