Using J-LINK and IAR to flash debug an STM32F405 requires a power cycle

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

  • Using J-LINK and IAR to flash debug an STM32F405 requires a power cycle

    Hi guys,

    Using the latest IAR (6.50.5) and J-LINK EDU (4.7)

    I can load flash and debug on the STM32F405 using the SWD interface. If I recompile and reload then IAR gives the message "The flash loader program reported an error". If I unplug the J-LINK's USB and cycle the power to the board that way, then I can reprogram the chip again.

    I haven't found the error message yet, I assume it's buried in some log file. It might give me a clue where to start. Where might this be?

    What have guys done to resolve this kind of problem?

    Configuration:
    The board is powered from J_LINK
    Target is set to "ST STM32F405RG" with FPU VFPv4
    SWDIO and SWCLK have 10K pullups to 2.5V
    NTRST is tied to 2.5V
    TRST, TDI, TDO are open.
    The processor speed is 160Mhz (assuming ... I need to check this)

    (The is my first ST32 project using SWD, but I've done a number using LPCs )

    Thanks in advance, Hank
  • Hi Hank,

    It seems you are using the IAR flashloader to flash the device.
    The J-Link DLL also comes with built-in flashloaders for popular microcontrollers.
    How to switch between the IAR flashloader and the J-Link flashloader is explained in the J-Link User Guide (UM08001), chapter 6.4.
    segger.com/cms/admin/uploads/p…Docs/UM08001_JLinkARM.pdf

    Please note that especially on the STM32F4xxx devices, the J-Link flashloader can show its full speed potential:
    segger.com/jlink-flash-download.html

    The error message you are seeing does not come from the J-Link DLL itself, it comes from within IAR EWARM.
    Could you please for testing switch to the J-Link flashloader and check if it still shows the problem you are currently seeing when flashing?


    Best regards
    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 Hank,

    No problem, that is what we are here for :)
    One happy customer more that now know the J-Link flashloaders and their high-speed :)


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