Keil™, An ARM® Company

Technical Support

µVISION DEBUGGER: SERIAL LOOPBACK SCRIPT


Information in this article applies to:

  • µVision Version 2 and Later

QUESTION

I need to simulate a serial loopback cable for part of my application diagnostics. Is this possible to do in the µVision 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.\n", SOUT);
    SIN = SOUT;
  }
}

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

SEE ALSO

Last Reviewed: Monday, March 28, 2005


Did this article provide the answer you needed?
 
Yes
No
Not Sure