Please enable JavaScript to view this site.

winIDEA Help

Version: 9.21.253

Navigation: Debugging > How-to guides

Scroll Prev Top Next More

How to find maximum debug frequency

In this topic:



Python script example


Debug frequency




The script can be used to identify the maximum debug frequency of a connected setup (embedded target & debugger BlueBox debugger). Limiting debug frequency is not strictly defined and it may vary depending on the embedded target used and its connection to the debugger.


Limiting frequency is a frequency, where debug interface signals between the embedded target and the BlueBox debugger cannot be correctly sampled respectively valid data read due to signal integrity issues. This can happen due to bad PCB layout of debug lines on the embedded target or due to use of a longer debug cable between the BlueBox and the embedded target. Using debug interface clock above the limiting frequency can result in a debug session operating unstable or not operating at all.



Disclaimer: For critical operations (i.e FLASH programming of critical sectors) we recommend to reduce debug frequency to max 80% of the identified frequency by the script.




winIDEA SDK for Python



Python script example

Download and unzip the script example via the link: debugFrequencyFinder.7z


How does this method work?

To find a stable debug interface frequency, several dummy RAM read and RAM write operations are performed at the start of the RAM area. Bisection algorithm tries to increase or decrease debug frequency in steps, depending on the result of the past executed operations. When the frequency step within the bisection algorithm reaches a certain threshold (1% of the difference between maximum and minimum debug frequency set or manual value set by argument -t at script execution) the script applies the last stable debug frequency and prompts you whether you want to save the new configuration or not.



Initial debug frequency set in a workspace must be valid to use this test! If you are unsure what frequency to set, set it to some low value which was tested to work.


Following debug protocols are supported using this method:

CoreSight SWD

JTAG (CoreSight, TriCore,...)

TriCore DAP






Use winIDEA SDK for running Python scripts.



Run the Python script with Python bundled with winIDEA using arguments below:








Path to workspace


RAM start location in hex


Minimal debug frequency (in kHz) to be tested (optional)


Maximal debug frequency (in kHz) to be tested (optional)


Debug frequency threshold (in kHz) (optional)


Verbose output (optional)


Path to your Python bundled with winIDEA



Debug frequency

Debug frequency threshold which is used during the test is calculated with the following formula:



In cases where the FREQUENCY_THRESHOLD calculation result is less than 100kHz, 100kHz will be used.


Default values:



FREQUENCY_THRESHOLD = 199 kHz (using above formula)




%ISYSTEM_PYTHON%\python.exe -wexample.xjrf -l0x20000000 -m300 -M20000 -t500



During the script execution do not manually control winIDEA instance which is being used by the Python script.



To set max debug frequency via winIDEA interface follow this tip: How to configure maximum debug interface frequency for best debug performance?


Copyright © 2024 TASKING