Get CPU's machine cicles from the C Scripting interface

Hi all,

Is it possible to get the CPU's machine cicles from a C script? I'm using the C Scripting feature of the uVision3, and I need to syncronise the scripts with the simulation. For example, i need to have a C script that will togle a pn after a specific number of machine cicles.... Is it possible?

Best regards,
Marius

Parents
  • I'm using the C Scripting feature of the uVision3,

    You're being a little hard to understand there. That's the language of debugger functions you're talking about. Yes, it looks and works a lot like C. But it's not C, nor is it really a script language --- it's somewhere in between.

    For example, i need to have a C script that will togle a pn after a specific number of machine cicles.... Is it possible?

    Yes. See the debugger script help file about twatch() and swatch() and friends (GS51.pdf, "uVision Debugger functions"

Reply
  • I'm using the C Scripting feature of the uVision3,

    You're being a little hard to understand there. That's the language of debugger functions you're talking about. Yes, it looks and works a lot like C. But it's not C, nor is it really a script language --- it's somewhere in between.

    For example, i need to have a C script that will togle a pn after a specific number of machine cicles.... Is it possible?

    Yes. See the debugger script help file about twatch() and swatch() and friends (GS51.pdf, "uVision Debugger functions"

Children
More questions in this forum