Giter Club home page Giter Club logo

Comments (4)

terjeio avatar terjeio commented on May 26, 2024

SWCLCK is driven low here, the 2 second delay could be added there? hal.delay_ms(2000, NULL);

from stm32f1xx.

dgangola avatar dgangola commented on May 26, 2024

Yes, that works as advertised. SWDIO (PA13) is still driven low. I don't see a reference to that pin anywhere. It seems like driving it low is a default action.

from stm32f1xx.

terjeio avatar terjeio commented on May 26, 2024

It seems like driving it low is a default action.

It is high level on my boards running grblHAL - with different board maps. I do not have a SKR board so cannot easily debug - must be bad code somewhere. Related to the TMC issue?

from stm32f1xx.

dgangola avatar dgangola commented on May 26, 2024

The problem is the bootloader. Once the bootloader is removed (overwritten), you can connect and debug.
For me, ST-Link devices (official and clones) did not "want" to connect, no matter what I tried.
I tried de-initting the pins, and then also setting SWD enable and/or JTAG enable in AFIO_MAPR. For what it's worth, I placed the following code in board_init() in btt_skr_mini_e3_2.0.c:

#ifdef RELEASE_SWD_PINS
    HAL_GPIO_DeInit(GPIOA, GPIO_PIN_14|GPIO_PIN_13);
//    __HAL_AFIO_REMAP_SWJ_NOJTAG();
    __HAL_AFIO_REMAP_SWJ_ENABLE();
#endif

I also removed C30, the reset timing cap, to try to improve the reset timing with "connect_under_reset" options.
Before I could learn what else the problem could be, I tried a Segger J-Link. It connected immediately, the bootloader was gone, and I was debugging.

Mind you, the board does not support SWD and USB communication at the same time. (Unless you modify the board. I connected GPIO PB5 to the gate of U7 to pull D+ high, and modified the code in board_init() appropriately.)

from stm32f1xx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.