Skip to main content
FLett
Associate II
October 15, 2018
Question

STM32F407 connection to st-link v2. I have a digital board running code from the external rom that connects to a color LCD panel, switches, and an some switches.

  • October 15, 2018
  • 12 replies
  • 3116 views

getting Error(4) and Error(7) at various point's in the error logs. USB communication seems to be working and firmware upgrade worked. Logs attached any thoughts?

    This topic has been closed for replies.

    12 replies

    Tesla DeLorean
    Guru
    October 15, 2018

    Don't fiddle with the GPIO or configurations used by the debugger interface.

    Don't put the core into a low power state, or cause bus transactions (DMA, etc) which interfere with attempts to wrestle the core into a halted state.

    Make sure the debugger can control the NRST pins.

    If strapping BOOT0 High makes the problems go away, you're code is doing something unhelpful.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    FLett
    FLettAuthor
    Associate II
    October 18, 2018

    Thanks for looking at this. An excellent clue. Code is running from flash and also making it impossible to halt the core. I incorrectly though st-link would work with anything running from flash.

    Tesla DeLorean
    Guru
    October 18, 2018

    Running from FLASH should be viable. If the debugger successfully connects to ROM, then it points to something your code is doing to interfere with normal operation.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    FLett
    FLettAuthor
    Associate II
    October 19, 2018

    Interesting, it's a bunch of DSP code, but it uses GPIO pins a bunch. By running from flash I'm thinking external flash. Is there an app note or something that discusses st-link's architecture and signal needs more than the notes I found that discuss cables and LEDs? Thank's for looking at my simple questions.

    waclawek.jan
    Super User
    October 19, 2018

    Can't this be more result of a hardware problem, like ground loops thrrough the debug cable, inadequate ground/return, too long debug cable, mcu supply problem...?

    JW

    FLett
    FLettAuthor
    Associate II
    October 19, 2018

    Super idea. Surprisingly though the little board is really clean for signal integrity stuff though. This time I'm running into my limited understanding of the st-link architecture and an inability to control software very much. The st-link isn't connecting to the target at all. Lately I'm thinking that I need to stop the software at a point when the core quite so JTAG can work. I'm attempting to connect the st-link/v2 to my slightly broken Open_Source software radio .

    FL

    waclawek.jan
    Super User
    October 20, 2018

    > the little board is really clean for signal integrity stuff

    You have the STLink onboard?

    JW

    FLett
    FLettAuthor
    Associate II
    October 20, 2018

    It isn't at that level of clean, but it is only connected through a 7 cm cable with ground on the cable to the board. "really clean" are famous last words, but I'm certain I'm more fundamentally messed up.

    I probably need to get more basic stuff correct, like: target-settings, software's use of GPIO, and core activity. Do you know of a summary sheet for target settings that works for the STM32F407? I think I may have a way of fixing the GPIO and core activity issue. Thanks for looking at my probably simple issue.

    FL

    T J
    Senior III
    October 21, 2018

    I don't want to say powersupply

    change the cable. change the JTAG dongle.. change computer... change the Ground Lead

    dont change the power supply ( :( )

    do you have cache turned on ?

    FLett
    FLettAuthor
    Associate II
    October 22, 2018

    Lots of great ideas. I previously didn't state clearly what does and doesn't work, my firmware update works and completes without errors. When I wrote: "it isn't connecting to the target." I meant the target chip target, not the USB dongle target- sorry about that. Anyway, I have some level of confidence in the Windows 10, St link/v2 dongle, cable, and drivers.

    Looking at whats working and not working I'm thinking I need to spend more time figuring out how to control the STM32 code I have and the st-link target configuration page.

    Thanks a bunch for looking at this thread and making suggestions that illuminated my unclear statement.

    FL