ARM Technical Support Knowledge Articles

SERIAL LOOPBACK SCRIPT

Applies to: uVision Debugger

Answer


Information in this article applies to:


QUESTION

I need to simulate a serial loopback cable for part of my application diagnostics. Is this possible to do in the uVision Simulator?

ANSWER

Yes. Basically, you need to create a signal function that waits for a write to the SOUT VTReg. When this VTReg is written, your script may read it and store the result in the SIN VTReg. For example:

signal void sio_loopback (void) {
  while (1) {
    wwatch(SOUT);
    printf ("Looping Back 0x%2.2X.
", SOUT);
    SIN = SOUT;
  }
}

The printf statement in this script notifies you (via the Command Window) that the script executed.

SEE ALSO

Article last edited on: 2005-03-28 10:24:19

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential