-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Boot Loop with STM32 on SKR E3 DIP #22078
Comments
Try disabling |
Tried example configs from Configurations repo. Only commented out #define SD_DETECT_STATE, as it seems to be inverted... Using STM32F103RE_btt here. Same config works flawless with STM32F103RE_btt_maple... Disabling ENDSTOP_INTERRUPTS_FEATURE doesn't work, ether. |
I have tested with and without sd-card and could not (yet) observe such behavior, meaning that I get boot loops in either case.
Did not work for me either but maybe @Masanetz approach is more viable: starting with a bare minimum (which hopefully does not boot loop immediately) and add the currently enabled features one after the other until boot loops occur. This way the possibility of overlapping issues might be reduced. I will also try a bare configuration and will report back later. |
Small Update: I have created a very simple config |
@7FM please activate SDSUPPORT in Configuration.h and retry. All my problems were related to SDSUPPORT... |
So yes, SDSUPPORT seems to trigger boot loops with the STM32 HAL. |
Also worth mentioning: |
Ok, when it worked for me I was with But, a build with just my LCD and the SD card worked. Probably there's something conflicting with the SD. The curious part is that there're lots users already using this new envs with success... or we break something recently, or we are using some combination of features that triggers the issue. And I've been using my jlink for months in STM32 with lots of different boards... But I can't connect it in my SKR MINI E3 V2 too... something is really not right... I will take a deep look. |
Try removing |
did not work for me, still getting boot loops with the minimal configuration and SDSUPPORT and env:STM32F103RE_btt as target |
Hum... for me, it worked... Let me check if I disabled anything else. |
env:STM32F103RC_btt never had this flag set and has the same issues as env:STM32F103RE_btt but I am also not sure what the exact differences are besides the larger ROM for the RE version |
|
still no luck for me (tried both environments), could you share your configs? I do not have an LCD but I guess this should not matter in this case. |
It's your configs with LCD and my board: |
Hmm, ok. I am currently using for this testing the mentioned simple config with most features disabled. |
Nope, definitely still boot looping |
So it seems a thing related with the pins file. |
Try add this to your pins file:
|
Interesseting without SD card I am now getting the behavior described by @Masanetz:
will do |
seems to work, will test the _USB env next! |
I will send a PR |
The other bugs remain:
|
I think I found the issue with SWD. It seems maple start the variant with SWD register in the reset state, allowing us to use it. But STM32 not. So, try this: #if EITHER(DISABLE_DEBUG, DISABLE_JTAG)
// Disable any hardware debug to free up pins for IO
#if ENABLED(DISABLE_DEBUG) && defined(JTAGSWD_DISABLE)
JTAGSWD_DISABLE();
#elif defined(JTAG_DISABLE)
JTAG_DISABLE();
#else
#error "DISABLE_(DEBUG|JTAG) is not supported for the selected MCU/Board."
#endif
#else
AFIO_DBGAFR_CONFIG(AFIO_MAPR_SWJ_CFG_RESET); // FULL SWD+JTAG
#endif I added the |
currently in most pin_*.h files |
With the |
Is that, for F1 boards, you need to comment out That's good. I will add the SWD fix to my PR and next I will test the serial :-) Let me know if find anything else! |
the E3 DIP does not have this flag set, just EDIT: saw the commit in your PR, LGTM!
Good luck :-) As always, I am available for testing! |
The serial issue may take longer to fix, because I can't debug when using my serial in this board (because of I will need to setup my JTAG to be able to see what is happening. This is the PR I'm adding the fixes: #22087 |
Looks good! I can successfully connect with Octoprint and also simultaneously mount the shared media :) But haven't run any prints so far. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Did you test the latest
bugfix-2.0.x
code?Yes, and the problem still exists.
Bug Description
As soon as I am using the STM32 HAL (STM32F103RC_btt, STM32F103RC_btt_USB, STM32F103RE_btt_USB) I am stuck in boot loops, notable by not beeing able to connect via USB and single Bltouch stow and retract between reboots. Using STM32F103RE_btt_maple does not result in a boot loop and allows connection via USB with Octoprint.
What I have tried so far:
I might be doing something wrong here. Any help is welcome, i.e. which pins will provide serial output, is USB emulated serial expected to work for output here too?
Bug Timeline
Seems related to the new STM32 HAL, but support for the enviorments I am using were added just recently so testing earlier commits might be difficult?
Expected behavior
No boot loops :)
Actual behavior
boot loops
Steps to Reproduce
Have an SKR E3 DIP or probaly alike and use my attached config.
Version of Marlin Firmware
Latest commit that I am currently using is: 3c522ff
Printer model
Ender 3 Pro
Electronics
SKR E3 DIP with TMC2208 drivers, BLTouch & a switch for filament runout detection
Add-ons
No response
Host Software
No response
Additional information & file uploads
My normal config but with MARLIN_DEV_MODE & POSTMORTEM_DEBUGGING enabled and USE_WATCHDOG disabled for testing: MarlinConfig.zip
I guess the next steps would be disabling used features one after the other or getting debug to work... Tips and ideas of any kind are welcome :)
The text was updated successfully, but these errors were encountered: