Skip to content
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] No response on SKR v1.3 / v1.4 LPC176x with SERIAL_PORT 0 and BAUDRATE > 250000 #22283

Closed
mh-dm opened this issue Jul 2, 2021 · 3 comments

Comments

@mh-dm
Copy link
Contributor

mh-dm commented Jul 2, 2021

Did you test the latest bugfix-2.0.x code?

Yes, and the problem still exists.

Bug Description

Have Marlin on SKR v1.3 LPC1768 and configure SERIAL_PORT 0 and BAUDRATE > 250000
Edit: Or SKR v1.4 Turbo LPC1769 and configure SERIAL_PORT 0 and BAUDRATE >= 1000000
Then I can only receive marlin's output over UART but any commands sent don't reach marlin (behaviour is similar to a disconnected RX0 on SKR 1.3). However comms over USB CDC (i.e. SERIAL_PORT_2 -1) work fine.

NOTE I have a working fix for this bug:
bugfix-2.0.x...mihai-dumitresq:skr-1.3-baud
I'll make a pull request but note that while it works and
CLKPWR_SetPCLKDiv(CLKPWR_PCLKSEL_UART0, CLKPWR_PCLKSEL_CCLK_DIV_1);
is correct I'm not sure of where to best place it.

It was developed by reading the troubleshooting in:
https://community.nxp.com/t5/LPCXpresso-IDE/LPC1768-uart-using-FDR-at-higher-baud-rates/m-p/544083
and trying to understand the changes in dd10a92

Based on the fix I assume SKR v1.4 (also LPC1768) to be affected too. Maybe also SKR v1.4 Turbo (LPC1769).

Bug Timeline

Bug is on latest 2.0.x and bugfix-2.0.x but it was also on 2.0.5.3 IIRC. Reporting now after investigating the issue in detail.

Expected behavior

M105 and other commands work.

Actual behavior

No response to any commands.

Steps to Reproduce

  1. Have SKR v1.3 or SKR v1.4 Turbo (or maybe any LPC176x)
  2. Connect using USB-TTL to 5V, GND, TX0, RX0 as per SKR 1.3 pinout overlay bigtreetech/BIGTREETECH-SKR-V1.3#140
  3. Set a high BAUDRATE, i.e. 460800, 500000, 921600, 1000000 for SKR v1.3 or 1000000 for SKR v1.4 turbo
  4. Build (default_envs = LPC1768) and flash.
  5. Listen in using the baudrate picked: picocom --quiet --echo --imap lfcrlf -b 921600 /dev/ttyUSB3
  6. Power up the board and notice Marlin output:
start
PowerUp
Marlin 2.0.9.1

echo: Last Updated: 2021-06-27 | Author: Mihai
echo:Compiled: Jun 30 2021
echo: Free Memory: 11703  PlannerBufferBytes: 1344
echo:V83 stored settings retrieved (633 bytes; crc 39877)
[...]
  1. Type in commands.

Version of Marlin Firmware

Marlin 2.0.9.1

Printer model

Ender 3

Electronics

SKR 1.3
SKR 1.4 Turbo

Host Software

SD Card (headless)

@mh-dm
Copy link
Contributor Author

mh-dm commented Jul 2, 2021

I've now tested SKR v1.4 Turbo / LPC1769 and turns out it's only somewhat affected:

  • on bugfix-2.0.x BAUDRATEs of 115200, 250000, 460800, 500000, 921600 work. BAUDRATE 1000000 does not work
  • with pull/22284, BAUDRATEs of 57600, 115200, 250000, 460800, 500000, 921600, 1000000, 2000000 (!) work

@mh-dm mh-dm changed the title [BUG] No response on SKR v1.3 with SERIAL_PORT 0 and BAUDRATE > 250000 [BUG] No response on SKR v1.3 / v1.4 LPC176x with SERIAL_PORT 0 and BAUDRATE > 250000 Jul 2, 2021
@thisiskeithb
Copy link
Member

Will be fixed in the LPC176x framework

#22284 (comment)

@github-actions
Copy link

github-actions bot commented Sep 6, 2021

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.

@github-actions github-actions bot locked and limited conversation to collaborators Sep 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants