Keil Logo

µ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
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.