[ABANDONED] error: could not detect CPU clock speed

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

  • [ABANDONED] error: could not detect CPU clock speed

    Hi,

    I am using J-link Base for debugging my board, the board is based on TI processor TMS470R1B1M.
    I am getting the error as "could not detect CPU clock speed" while erasing the internal flash. Attached error log file.
    What's wrong with my JTAG connections? or is that the TI chip is not responding?

    Regards,
    Sekhar
    Images
    • error log.jpg

      106.99 kB, 667×337, viewed 1,644 times
  • Hi Sekhar,

    This error message states that J-Link (as part of the preparation of the requested erase) was able to write test code to RAM and was also able to read it back, but the code
    which was read back does not match the code that was written into RAM in the first place.

    Could you provide us with a complete J-Link Logfile ?
    Log output can be enabled like as follows:
    • Open a connection to J-Link, e.g start J-Link Commander
    • In J-Link Control Panel: (Click the J-Link symbol located in the notification / tray area in order to open J-Link Control panel)
    • Open the tab "Settings"
    • Next to the field "Log file" check "Override" and click "..." in order to choose a log file path.

    This is also described in UM8001 Chapter 5 "Working with J-Link and J-Trace", Section 5.7 "J-Link control panel" .

    If you do not consider the information you sent me via PM private, I would like to ask you to post it here.
    This will make it so that all people (especially other SEGGER employees) can get all information available on this case by just reading this thread.

    Best regards,
    Niklas
    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.
  • Hi Niklas,
    Thanks for the response.



    I am not able to find out the Settings tab by clicking on the J-Link icon/tray on J-link commander, see attached file "settings error". Please help me to change the log file path to provide you the full log.
    However I am sending the complete log file with J-link commander itself, see attached file"commander log".


    Regards,
    Sekhar
    Images
    • commander log.JPG

      113.02 kB, 668×846, viewed 967 times
    • settings error.JPG

      57.11 kB, 668×420, viewed 846 times
  • Hi Sekhar,

    with the phrase "notification / tray area" I was referring to the area on the right of the Windows Task Bar,
    usually an array of (small) icons next to the system clock.
    (Image attached)


    Best regards,
    Niklas
    Images
    • TrayIcons.png

      2.71 kB, 182×35, viewed 2,119 times
    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.
  • Hi Niklas,



    Yes i am able to capture the log, attached the same. in the last but one line i am getting the error "Failed to measure CPU clock frequency".

    This is the problem i am facing. Please suggest me how to overcome from this issue?



    Regards,

    Sekhar
    Files
    • Jlink_log.txt

      (10.72 kB, downloaded 865 times, last: )
  • Hi Sekhar,

    sorry for the delay in response.

    Could you try to execute an reset ('r' in J-Link Commander) prior to the 'erase' command?

    In case this does not help you:
    Could your provide us with further information on what you are writing to memory and for which purpose?

    Best regards,
    Niklas
    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.
  • Hi Niklas,

    Good to see your reply.

    Well, i have given reset "r" in commander, even then no use, i am getting same error as "Could not detect CPU clock speed". Attached log file and screen shot for your reference.

    We are writing into some registers for memory configurations, by doing this we can access internal memory of the TMS470R1B1M device. I think this is not related to the issue what i am getting. The error what i am getting is related to the J-link i feel.

    Did you faced any time this kind of error "Could not detect CPU clock speed". when this kind of issue will occur?


    Regards,
    Sekhar
    Images
    • reset command.JPG

      112.64 kB, 668×924, viewed 826 times
    Files
    • Jlink_log.txt

      (6.83 kB, downloaded 739 times, last: )
  • Hi Sekhar,

    We are writing into some registers for memory configurations, by doing this we can access internal memory of the TMS470R1B1M device.
    You perform 16 bit accesses to 32 bit wide registers which is forbidden. The behavior after performing illegal write accesses, depends from CPU to CPU (may brings the CPU in a wired state, hard fault, etc...).

    The J-Link software and documentation package includes a J-Flash project for the TI TMS470R1B1M with the correct init sequence which is known to be working. You can use the project as reference and adapt the sequence from the J-Flash "Init Steps" (Project settings -> CPU -> Init steps) syntax to the J-Link Commander syntax. Please make sure to use the correct access width (e.g. "Write 32 bit" --> "w4", "Read 32 bit" --> "mem32).

    The sample project is located in the installation directory: %SEGGER_INST_DIR%\Samples\JFlash\ProjectFiles\TI\TMS470R1B1M.jflash

    The J-Link Commander sequence should look like:
    JLink.exe -device TMS470R1B1M -if JTAG -speed 1000 -jtagconf -1,-1, -autoconnect 1
    r
    w4 FFFFFFE0,00004007
    [...]
    erase


    Best regards
    Erik
    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.
  • Dear Erik,

    Thanks for the response.

    We followed your suggestion and we can see the CPU clock speed with J-Flash utility. attached snapshot and marked red. The same thing why it is not happening in J-link commander. Commander is throwing "could not detect CPU clock speed" what is the difference in Commander and Flasher?

    Buy the way can i get trail license for J-flash? Please let me know how to get the license. I am hoping that J-flash will work for me without any errors.

    Sekhar
    Images
    • J-flash snapshot.jpg

      206.66 kB, 1,280×1,024, viewed 1,052 times
  • Commander is throwing "could not detect CPU clock speed" what is the difference in Commander and Flasher?
    Sounds like the initialization in J-Link Commander is still not correct because J-Flash and J-Link Commander should behave exactly the same. Can you please send us the adapted init sequence, which you are performing in J-Link Commander so we can check if we see any mistakes?

    Regarding J-Flash trial license, please get in contact with sales@segger.com.


    - Erik
    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.
  • Dear Erik,



    I got the J-flash trail license for 1 month, thanks for the quick support from Segger.



    I am getting different issue with J-Flash now. I am just giving erase command. But it is throwing error like "RAM could not access"



    In the commander the below config i am giving

    w2 0xffffffe0 0x4007
    w2 0xfffffe04 0x00b0
    w2 0xfffffe00 0x0000
    w2 0xfffffe08 0x0000
    w2 0xfffffe0c 0x0000
    w2 0xfffffe10 0x0040
    w2 0xfffffe14 0x0070
    w2 0xfffffe18 0x0000
    w2 0xfffffe1c 0x0000
    w2 0xfffffe20 0x0080
    w2 0xfffffe24 0x0010
    w2 0xfffffe04 0x01b0


    Regards,

    Sekhar
  • Did you make sure to power cycle the target before trying out J-Flash? It might be possible that the device is in an confused state.

    As assumed: You are still using the incorrect write access width in J-Link Commander which may result in unexpected behavior (see previous post):
    Please make sure to use the correct access width (e.g. "Write 32 bit" --> "w4", "Read 32 bit" --> "mem32).
    The J-Link Commander sequence should look like:
    JLink.exe -device TMS470R1B1M -if JTAG -speed 1000 -jtagconf -1,-1, -autoconnect 1
    r
    w4 FFFFFFE0,00004007
    [...]
    erase
    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.
  • I just gave it a quick try on the IAR TMS470R1B1M evaluation board (TI TMS470R1B1MPGEA device on it) and the sample project is working perfectly fine (see attached screenshot). Do you use custom hardware or an evaluation board? In latter case, which eval board? If custom hardware, please give it a try using an evaluation board.

    Best regards
    Erik
    Images
    • TMS470R1B1M.jpg

      259.91 kB, 912×942, viewed 934 times
    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.
  • Dear Erik,

    Came back with same problem.

    Well, we replaced the TI IC (TMS470R1B1M), still i am getting the same problem, as "could not detect CPU clock speed".
    I strongly need to update the Segger firmware, Please let me know how do we do that? First is it possible? If not what are the alternates?

    Regards, Sekhar
  • As described before, we have tried the latest version on the IAR evaluation board and everything is working as expected.

    Please answer the question from my previous post:
    Do you use custom hardware or an evaluation board? In latter case, which eval board? If custom hardware, please give it a try using an evaluation board.

    I strongly need to update the Segger firmware, Please let me know how do we do that? First is it possible? If not what are the alternates?

    Not sure if i understand you correct here. If the segger firmware is not up to date, a firmware update will be offered when using the latest version.
    If no firmware is offered, you are already using the latest one.


    - Erik
    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.
  • Dear Erik,



    We tried with other J-link emulator, we got the same issue, And the one what i am using is working with other controller. Looks like no issues with Emulator. Some problem with TMS470. I need to solve.



    By the way I use custom hardware not evaluation board. we did not purchased the evaluation board.



    Regards,

    Sekhar
  • Hi Sekhar,

    as everything is working fine on the evaluation board but not on your custom hardware, it seems that there is something different on your hardware or with your setup.
    By the way I use custom hardware not evaluation board. we did not purchased the evaluation board.
    That's why we always recommend to purchase an evaluation board before creating the custom hardware. We have tested on 4 different evaluation boards and everything is working just fine. Please understand that without being able to reproduce the behavior here, there is not much we can do right now.

    We could offer you to have a look at the debug interface signals, if you provide us with a snapshot of them (e.g. by using an oscilloscope).


    - Erik
    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.