JLink and IAR EW with STM32

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

  • JLink and IAR EW with STM32

    Hi all,

    I have a problem with debugging a STM32F103RBT6 with IAR Embedded Workbench 5.41 and JLink.

    I cannot get the JLink (or the IDE?) to do a hardware-reset on my target during a debug session whatsoever. The controller is programmed correctly and I can see the "Low" on the "Reset"-pin issued by the JLink during programming. Debugging works fine as long as I use Go, Break, Step,... but when I hit "Reset" in the debugger the program execution is stopped and reset but nothing happens on my reset-pin any more! My LCD keeps its content unlike on a normal reset. When I then start the program again it hits a "HardFault". The only way to get a correct reset is to press the reset-button on my board or to restart the debugger with or without downloading the code again. But I'm pretty sure that's not the way it's supposed to work.

    It seems to be a configuration problem but under "Project" -> "Options" -> "Debugger" -> "JLink/JTrace" the "Reset"-option is set (correctly?) to "Reset Pin" according to the JLink-manual. The problem is the same with the JLink-driver that came with IAR EW 5.41 as well as with the newer one (JLink_ARM V4.12) from the SEGGER-website (I haven't tried the beta yet). Are there any other config options I'm not aware of? I worked with Ride7 and RLink before and on those the same project runs properly. So it's neither my code nor my board causing the problem.

    Any ideas? Thx for your help!

    Dominik
  • You might want to post the Debug Log that IAR generates - I don't have a selection for "Reset Pin" in my J-Link configuration (but I'm using a somewhat older version of IAR and a different STM32 device) - so we can know exactly which reset strategy the JLinkARM.dll is using. Mine is using "Type 0: Normal" which seems to use the reset pin only as a near last resort. My IAR configuration dialog only shows me "Normal", "Core only", and "Core and Peripherals" strategies.

    Take a look at the J-Link/J-Trace ARM User Guide, section 5.8.2 for details on the Cortex-M3 reset strategies. I suggest trying "Normal" and see how that works.