[ABANDONED] GigaDevice GD32F307VC Connect after reconfiguring Debug / SWD Pins to GPIOs in Firmware

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

  • [ABANDONED] GigaDevice GD32F307VC Connect after reconfiguring Debug / SWD Pins to GPIOs in Firmware

    Hi,

    setup:
    - PCBA incl. GigaGevice GD32F307VC
    - J-Link Compact: SWD Interface
    - Windows 10
    - DLL Version: v7.80c

    When I reconfigure the SWD Pins to normal GPIOs in the firmware right after bootup I'm having the issue that I'm not able to connect to the controller through SWD interface anymore by using jlink.exe:
    1. connect [ENTER]
    2. GD32F307VC [ENTER]
    3. S [ENTER] // using SWD Interface
    4. [ENTER] // using default speed: 4000 kHz

    => Failed to power up DAP
    => CPU cannot be halted

    I've already tried to set the reset type to ALL available options after "connect under reset" did not work.
    Additionally I've decreased the interface speed to a way lower value (< 1000 kHz) - still no luck.
    Digging further into this issue I've found out that it's possible to establish a connection when using speed 0 / auto (seen that when connecting with the default settings of jmem.exe it worked).
    I know I already have a workaround for this issue (which took some time to find) - still it would be important to know what is done differently when using "speed auto" in the DLLs?
    I also want to make sure that I'm using the correct way to connect in our own J-Link applications (bought the J-Link SDK last year...).

    Thanks!
    Daniel
  • Hi,

    I assume that you have connected the reset pin of the MCU to the reset pin of J-Link, correct?
    Without this, connect under reset will not work.

    In general, it is not smart to disable the debug pins while still developing on a device…
    Most MCUs do not even have a fail-safe connect (like connect under reset).
    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,

    yes, reset pin is connected to the reset pin j-link compact (pin 15).
    Development on device has already been completed.
    Programming the MCU for the first time is also no problem, but in case re-programming is required (e.g. in production) this issue pops up.
    I know debug pins should be avoided to be used as GPIOs, nevertheless it was required since all pins have already been in use.
    As far as I know GD32F307VC should be able be safely reset by using the nRST pin?

    Thanks,
    Daniel