Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
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?
Question relating to:
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.
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 04 Feb 2015Jane - 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 04 Feb 2015Yes, I did this configuration too. But anyway, if I don't press the "send break" or the "Del", nothing happens.
posted by 04 Feb 2015See 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 04 Feb 20159 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.
If still stuck: Ensure flow control is disabled in TeraTerm.
posted by Paul Russell 05 Feb 2015