-
-
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] SKR Mini e3 v1.2 USB Not Working #25705
Comments
Using your configs with current Connection log & M503 output:
Connecting...
Printer is now online.
>>> M115
SENDING:M115
FIRMWARE_NAME:Marlin bugfix-2.1.x (Apr 18 2023 21:43:55) SOURCE_CODE_URL:github.com/MarlinFirmware/Marlin PROTOCOL_VERSION:1.0 MACHINE_TYPE:Ender-3 EXTRUDER_COUNT:1 UUID:cede2a2f-41a2-4748-9b12-c55c62f367ff
Cap:SERIAL_XON_XOFF:0
Cap:BINARY_FILE_TRANSFER:0
Cap:EEPROM:1
Cap:VOLUMETRIC:1
Cap:AUTOREPORT_POS:0
Cap:AUTOREPORT_TEMP:1
Cap:PROGRESS:0
Cap:PRINT_JOB:1
Cap:AUTOLEVEL:0
Cap:RUNOUT:0
Cap:Z_PROBE:0
Cap:LEVELING_DATA:1
Cap:BUILD_PERCENT:1
Cap:SOFTWARE_POWER:0
Cap:TOGGLE_LIGHTS:0
Cap:CASE_LIGHT_BRIGHTNESS:0
Cap:EMERGENCY_PARSER:1
Cap:HOST_ACTION_COMMANDS:0
Cap:PROMPT_SUPPORT:0
Cap:SDCARD:1
Cap:MULTI_VOLUME:0
Cap:REPEAT:0
Cap:SD_WRITE:1
Cap:AUTOREPORT_SD_STATUS:0
Cap:LONG_FILENAME:1
Cap:LFN_WRITE:0
Cap:CUSTOM_FIRMWARE_UPLOAD:0
Cap:EXTENDED_M20:1
Cap:THERMAL_PROTECTION:1
Cap:MOTION_MODES:0
Cap:ARCS:0
Cap:BABYSTEPPING:1
Cap:CHAMBER_TEMPERATURE:0
Cap:COOLER_TEMPERATURE:0
Cap:MEATPACK:0
Cap:CONFIG_EXPORT:0 Here's the binary that was generated: Issue-25705-firmware_bin.zip The onboard SD card also shows up under macOS & Windows. Delete the hidden If that doesn't work:
|
Hmm @thisiskeithb oddness... I basically did this:
Should be noted that once this has happened, it's like the USB device is remembered as broken.... subsequent reboots of the printer will not make a COM port appear (even though a USB device does connect). Connecting the printer to a different USB port will repeat the process. Note: The above is all very likely what happened with my build too. The USB volume did appear, but wasn't browsable, that I know for sure, and the rest of the behaviour seems about right, I just hadn't figured it out yet. Any suggestions at this point? I'll again note that my Marlin 2.0.x bugfix firmware (built from the branch around April 2021) is bulletproof on USB. Here is what that USB reports as:
|
No issues browsing the SD card contents on Windows or macOS. Try a different SD card? USB cable? For best results getting help with configuration and troubleshooting, please use the following resources:
After seeking help from the community, if the consensus points to a bug in Marlin, then you should post a bug report. |
Thanks @thisiskeithb I went and did some more digging...I realize this works on your machine, which is admittedly confusing, however working in the 2.0.x bugfix branch, this is the exact PR that breaks composite USB on my machine/laptop combination: ...in that PR the onboard_sd.cpp file is modified, along with a bunch of SKR pin file stuff. That can't be a coincidence... I'll try applying the changes from within that PR one by one to see if I can get the line of code that caused it.... obvious first thing I'll check is the onboard_sd.cpp which changed how the CS_HIGH is executed. it goes from:
to:
....and I'll be honest I can't follow that CS_HIGH() alias just by looking at it...but...it seems different and I'm wondering if it's leaving some register bits in a weird state. |
Ok - so: Now, taking the latest from the bugfix branch and undoing that onboard_sd.cpp doesn't fix the firmware for me. So, my list of mysteries is:
|
Ok, so more digging: #23685 also modifies ONBOARD_SD.CPP, with this change:
Note that in my case, ONBOARD_SD_CS_PIN does equal SD_SS_PIN, so both CS_LOW() and CS_HIGH() will map to empty functions. So...what has shaped up then is that: If I undo both of those changes, and force the following mapping for CS_LOW() and CS_HIGH():
Then the SD card works again.... |
Ok @thisiskeithb: Current bugfix 2.0 (as of 70c5bca8c287f36a77d97b1cfe402d9334339d46 does not work with the default config on my printer. If I change Marlin/src/HAL/STM32F1/onboard_sd.cpp to make the following function mappings:
Then it works again...so this appears to be something with how the firmware is interacting with the hardware on the board. I feel like I've demonstrated there is a bug here. Should this be re-opened? Or should a file a new and more specific bug? I'll see if I can get the same result in the 2.1.x branch (but not today) EDIT: Should note that the schematic for my board shows that the CS input for the SD card peripheral is wired to be pulled-high, and thus the STM32F1 needs to pull it down to activate it. I would guess the current 2.0.x branch is leaving the pin floating. I don't think that is a correct way to handle that pin? |
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.1.x
code?Yes, and the problem still exists.
Bug Description
Using Marlin Autobuild and target STM32F103RC_btt_USB with the sample Ender3 SKR Mini e3 v1.2 from the 2.1 bugfix branch ZIP
Once flashed, Marlin boots:
PC makes a USB connected noise
No USB drive appears
No COM port appears
Note that I tried with the non-bugfix 2.1 build, and that results in the unit being unresponsive (blank LCD).
Reverting back to a 2.0.x firmware fixes things, restoring USB Composite functionality.
Bug Timeline
No response
Expected behavior
Expect normal USB Composite (Drive and COM) behaviour.
Actual behavior
Neither USB drive or COM ports appear.
Steps to Reproduce
Build bugfix with the sample ender 3 skr mini e3 v1.2 config.
Copy firmware.bin to an SD card
Insert the SD card into printer and reboot.
Version of Marlin Firmware
2.1.x Bugfix
Printer model
Ender 3
Electronics
SKR Mini e3 v1.2
Add-ons
Clone BLTouch
Bed Leveling
None
Your Slicer
None
Host Software
None
Don't forget to include
Configuration.h
andConfiguration_adv.h
.Additional information & file uploads
USB Device Diagnostic on my PC tells me this:
Bug25705Config.zip
The text was updated successfully, but these errors were encountered: