[ABANDONED] Keil IDE watch windows etc not updating when running ST motor code with J-Link

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

  • [ABANDONED] Keil IDE watch windows etc not updating when running ST motor code with J-Link

    I have motor code running on a STM32G431 MCU and am using Keil IDE with J-Link debugger. When the motor is stopped I can see timer registers updating and can inspect watch variables. I'm also have a simple uart command interface I use to start/stop the motor and read some variables.
    When I start the motor the Keil IDE watch window stops updating. I have it set to periodic update under the View menu but nothing updates. I can still communicate over the uart interface but the J-link seems locked out. Is this a problem with priority level settings?
    Also, if the motor code is already running I cannot connect with the J-link. I need to issue a command to stop the motor then I can connect the debugger and read registers or start the motor.
    Any suggestions? ---- Right now I am very hampered in debugging the code under these conditions.

    Thanks,
    BT

    Additions: It's been 3 weeks and I'm still stuck on this problem. The debugger downloads the code to flash and runs with the debugger displaying properly but as soon as the motor start command is given the debugger crashes. The motor runs and I can still communicate over the uart but there is no updating of debugger windows which are now trash. Even if I give the command to stop the motor, which it does, the debugger is long gone. Any suggestions how to debug this?

    The post was edited 1 time, last by btremaine: Looking for more inputs from community ().

  • Is it possible that WFI / WFE low power modes are used while using the motor?

    If you can provide a sample project that runs on an eval board, we can have a quick look.

    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.
  • Hi Alex,

    My MCU is running on a custom board. I could provide project software but it is tied to unique hardware. Also, I am not knowingly using any low power modes.

    Other notes,
    I added commands to my uart code so that I can display memory locations. Doing this and using the memory map I can see some variables changing as I expect, but the debugger displays AAAAAAAA as example for almost all watch points and peripheral registers.
    Also, when the motor is running and I choose ToolBox->Update Window it does not force a onetime window update, everything stays at AAAAAAAA.
  • Additional info,

    I've been using a J-Link EDU for debug. I was told by someone the EDU might have weaker drivers than the J-Link Base, so I tried the Base unit. Now when I start the motor the debugger windows do not crash, they freeze at what they were displaying. If I use the Keil debugger command 'Update windows' it does NOT update the windows. This is still a problem for debugging. This does show though the EDU unit is more susceptible to this problem than the Base unit.
    I also found four of the five JTAG lines ALSO are routed to an FPGA. The pins are not active, they are default high impedance, but I suspect the additional trace layout does not help this problem.
    Any comments or feedback on these findings?

    Thanks,
    Brian
  • I added test-points to the custom board we are debugging that crashes the debugger when the motor start command is issued. What I have here are traces of JTDI, SWO, TCK and TMS as the MCU is running in debug mode with the J-LINK EDU JTAG connected. This is before a motor start command is received. The scope probes are 10x mode at 2V/div and the bandwidth is full, which is maybe 500MHz in this case.

    One capture is 4us/div another is 1us/div and also at 400ns/div.

    Is the TCK and TMS relationship, okay? Why isn't the TCK closer to 50% duty cycle?

    The 4th trace with all static signals is after the motor start command is given. There was a flurry of data transfer then the lines are in the static states shown, all signals high except JTDI.


    Can anything be concluded from this?
    Images
    • jtag_edu_4.jpg

      96.77 kB, 640×481, viewed 229 times
    • jtag_edu_3.jpg

      99.97 kB, 640×481, viewed 223 times
    • jtag_edu_2.jpg

      105.2 kB, 640×481, viewed 230 times
    • jtag_edu_1.jpg

      108.58 kB, 640×481, viewed 303 times
  • Hi,
    without looking to deep into this, I can see that you did not answer all of Alex's questions:

    SEGGER - Alex wrote:

    Is it possible that WFI / WFE low power modes are used while using the motor?

    Regarding the issue:
    Unfortunately, your setup is very customized and there is no way for us to replicate the issue like this.
    Do you see the same behavior (watch windows not updating) also in a simple application?
    If so, we could have a look at this, if you provide us with the simple sample application.
    If not, we would recommend to compare the applications.

    Best regards,
    Fabian
    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.