GETFREQ
The GETFREQ function returns the target TCK frequency in Hz taking into account the target TCK frequency of all active Subchains.
If GETFREQ is called while running a subchain test reset sequence, it will only return the target TCK frequency of that subchain.
The GETFREQ statement can only be used inside a JTAG block.
Projects created prior to XJTAG v4.0 open with Classic Scans mode selected. In this mode GETFREQ will return the project TCK frequency.
A target TCK frequency returned is not a guarantee it will run at that exact speed. Rather it is only guaranteed it will not exceed it. It may run slower due to other factors in the project setup or the type of XJLink hardware used at runtime.
GETFREQ is also used to get the target TCK frequency of SWD.
GETFREQ can be called without any brackets after it, but this usage is discouraged and will be deprecated in a future version.
Syntax
GETFREQ()
Return value
An INT value containing the target TCK frequency.
Errors
An error can occur in the following circumstances:
- GETFREQ is used outside of a raw JTAG block.
- There is more than 1 JTAG chain active and they have different target TCK frequencies.
- There is no JTAG chain active and the project is running in Optimised Scans mode.
Example
LOCAL ReportFreq()(INT freq) JTAG freq := GETFREQ(); END; PRINT("Current target TCK frequency is: ", freq, " Hz.\n"); END;
The SETFREQ function can be used to change the TCK frequency of JTAG chains during testing if this is required.
XJTAG v4.1.100