-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
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] SKR2 serial partially working #21982
Comments
I got the same issue with this combination and found the root cause. There is a conflict with pin PB11 which is defined for USART3 in variant too. You can change line 217 in file Marlin/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/PeripheralPins.c: For me it is working, but don't know if this would affect any other boards using this variant and/or if this is a correct fix. |
Good catch! Thanks for sharing :) I might wait for the confirmation that it's safe to apply, but it's nice to know my board is not DOA. edit: might be better to open a pull request see where it goes, @alex2501 |
I don’t know why all the peripheral pins are commented out. There’s no harm letting everything uncommented. |
Did you mean the opposite or do you mean alex2501's workaround is coincidental ? |
I mean that @alex2501 patch is right, but we should not needed it if the variant file was right. Someone commented those lines, but it should not be commented at first place. |
still happens. |
I wonder if this could be related to #22181 …. In that case the MMU2 uses a serial port on an SKR board, and somehow this is messing with endstops. |
Didn't test it more than homing and checking temperatures but : feb6d28 appears to fix it, thanks. |
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
I have a BTT SKR2 board and an esp12s (btt RRF Wifi module for SKR2).
According to the motherboard documentation, there's a double jumper to select wether U-disk or Spi Wifi is enabled, and it mentions that "U-disk jumper makes the wifi module work only on UART, only on Marlin).
Which is why I decided to give the wifi module a try, I breadboarded the thing with 10k ohms and a serial-to-usb adapter and properly flashed it with ESP3D 2.1.1 (also flashed the "spiffs size detection" sketch, it has 4mb and RX/TX on the esp12s is working).
I then plugged it to the motherboard and adapted my config (serial_port{1/2} to 3, LCD screen doesn't show any M117 messages from the ESP (no IP address, nothing), but ESP3D terminal shows some serial messages from marlin :
if I use an usb flashdrive, plugged/mounted on the board, ESP3D won't get any messages from marlin, as soon as I eject/unplug my flashdrive, ESP3D gets spammed by "waiting for media...".
Which is when I tested different media settings, in case the flashdrive usb port has pins/timers/serial shared with the Wifi module header pins, when I use the onboard SD OR my 12864 SDcard reader OR multi_volume with
#define DEFAULT_VOLUME SV_SD_ONBOARD
I always get marlin's serial messages.I then decided to look at what the ESP_xxx pins were attributed to in https://github.com/MarlinFirmware/Marlin/blob/bugfix-2.0.x/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h#L516
Only :
seems to be used by marlin in https://github.com/MarlinFirmware/Marlin/blob/bugfix-2.0.x/Marlin/src/HAL/shared/esp_wifi.cpp
pin definition is missing ESP_WIFI_MODULE_GPIO2_PIN but that pin on the motherboard is physically hardwired to VCC so it's pulled up anyway (and the esp module boots/connect to wifi) so it doesn't look to be the issue.
should be working fine, but since ESP-TX (sending commands to marlin) doesn't work, I tried a few things found online :
pins_debugging / M43 shows PD8/PD9 (ESP rx/tx pins) uses "USART1..3" (I forgot to save M43's output, I might rebuild and post it if that's relevant).
SKR2 uses a script to create a generic platformio variant and I couldn't (didn't really try to) find its' pin map, which is where I got lost ^^.
Bug Timeline
new bug, SKR2 release
Expected behavior
working RX/TX serial between ESP and marlin
Actual behavior
ESP-RX / PD8 pin works (marlin serial messages shows in ESP3D's terminal), ESP-TX / PD9 pin doesn't.
Steps to Reproduce
Version of Marlin Firmware
bugfix-2.0.x
Printer model
diy
Electronics
BTT SKR2
Add-ons
BTT RRF Wifi module (an ESP12s)
Your Slicer
No response
Host Software
SD Card (headless)
Additional information & file uploads
cfg.zip
The text was updated successfully, but these errors were encountered: