01-08-2010 09:51 AM
I am programming an application with Labview 8.6, which communicating with an embeded Linux system board. Due to need to interact with the UBoot, and if available, I must type the Ctl+C to break the uboot executing, this is so truble. So I want to send the “Ctl+C” via the serial port and let the target system receiving. Any one can give a prompt? Thanks.
David
01-08-2010 10:03 AM
01-08-2010 10:07 AM
This page is a great resource for this kind of information. From the ASCII Q&A section:
Q: What's the ASCII code for CTRL-A, or CTRL-Z?
A: The value for CTRL-A (^A) is 01. The value for CTRL-Z (^Z), which is often used as an end-of-file marker in DOS is 26 (decimal). All the other CTRL-B through CTRL-Y characters fall in between. (CTRL-B is 2, CTRL-C is 3, and so forth.)
01-08-2010 07:46 PM
I think that have nothing to do with the UBoot, if want UBoot to receive the "CTL+C" signal, it should send "CTL+C" to the target CPU.
David
01-08-2010 08:01 PM - edited 01-08-2010 08:05 PM
What is "UBoot"?
The only character that can be sent by the serial port that is a Ctrl-C is the ASCII character 3. It is also known as the ETX or "end of text" control character.
If sending the ASCII character 3 doesn't work for you, then you will have to provide more detail as to what "UBoot" is, what you mean by the target CPU, and your overall serial port communication setup.
Are you sure you are talking to this CPU using a serial connection? A Ctrl-C on a keyboard will break running code, but a keyboard is not connected using a serial port. A ctrl-C is a special keycode mapping. The ctrl is a modifier key that the keyboard port knows how to handle to send the appropriate scan code.
01-09-2010 01:15 AM
UBoot is a kind of software to use to initiate the embedded firware and to load the OS such as embedded Linux. OK, I have get the result. I noticed that in the UBoot codes, there is a function used to monitor the" cancel" command from the keyboard, due to this command is also send via the serial port (because must observer the target system via a terminal tools), so I just send the 0x03 to the target, it respond as I press the "CTL+C" .
David
01-09-2010 03:17 AM
color wrote:I think that have nothing to do with the UBoot, if want UBoot to receive the "CTL+C" signal, it should send "CTL+C" to the target CPU.
David
Is it not better to try thing out first. Before cocky brush it aside as a not working idea?
01-09-2010 09:31 AM
color wrote:I think that have nothing to do with the UBoot, if want UBoot to receive the "CTL+C" signal, it should send "CTL+C" to the target CPU.
David
As long as the device will accept characters over the serial port during its bootup then it will see the Ctrl-C and go into its Uboot state. I've done it before with microprocessors.