[SOLVED] Failed to measure CPU clock frequency: second loop count is less than first one! (836013<=-1)

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] Failed to measure CPU clock frequency: second loop count is less than first one! (836013<=-1)

    Dear all,

    I'm having some issues with the Jlink commander flashing a device prior a test. Sporadically the Jlink fails with the error below:


    Source Code

    1. device R7FA6M2AF
    2. selectinterface SWDspeed 4000
    3. ExitOnError 1
    4. loadfile target.hex
    5. r
    6. go
    7. q

    Source Code

    1. SEGGER J-Link Commander V6.88b (Compiled Nov 27 2020 15:45:43)
    2. DLL version V7.82d, compiled Nov 23 2022 16:03:45
    3. J-Link Command File read successfully.
    4. Processing script file...
    5. Connecting to J-Link via USB...O.K.
    6. Firmware: J-Link V11 compiled Feb 20 2023 12:18:47
    7. Hardware version: V11.00
    8. S/N: 601018266
    9. License(s): RDI, FlashBP, FlashDL, JFlash, GDB
    10. VTref=3.354V
    11. Selecting SWD as current target interface.
    12. Selecting 4000 kHz as target interface speed
    13. [ Message content over the limit has been removed. ]
    14. [0][4]: E0040000 CID B105900D PID 000BB9A1 TPIU
    15. [0][5]: E0041000 CID B105900D PID 000BB925 ETM
    16. [0][6]: E0042000 CID B105900D PID 002BB908 CSTF
    17. [0][7]: E0043000 CID B105900D PID 001BB961 TMC
    18. [0][8]: E0044000 CID B105F00D PID 001BB101 TSG
    19. Cortex-M4 identified.
    20. Downloading file [target.hex]...
    21. Comparing flash [000%]000%]050%]050%]100%] Done.
    22. J-Link: Flash download: Bank 0 @ 0x0100A150: Skipped. Contents already match
    23. ****** Error: Failed to measure CPU clock frequency
    24. Failed to measure CPU clock frequency: second loop count is less than first one! (836013<=-1)
    25. Unspecified error -1
    26. Script processing completed.
    Display All


    I should note that this not appear to happen if I insert an erase command before loadfile. However I feel this wears down the chip too much since most of the time we're flashing similar files most of the time.

    Do you have any advice on how to prevent this error?
  • Hi,

    It looks a bit like you are using some kind of weird combination of J-Link Commander V6.88b from 2020 with a DLL V7.82d from 2022.
    You should always use Commander + DLL from the same shipment with the same version.
    + I recommend to use the current version as there is neither support given nor problems being investigated for old versions.


    BR
    Alex
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.