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
ae89a65 breaks serial (not usb) communication for lpc1768 #4194
Comments
I can confirm that commit is not correct for serial support. After the above change, a baud of 250000 would require a serial clock divisor of 6.25, and the code does not work correctly with fractions like that. (Previously, the peripheral clock was 4 times faster, and a divisor of 25 was fine.) I'll need to think on how to fix that. -Kevin |
As a temporary workaround just use a baud rate of 256000 where the divisor is 6.1035.... @KevinOConnor To keep the 250000 I found no other solution than to modify the clock as before.
The code would look something like this:
If you agree I send a PR. L. |
I had a laymans look at the errata which suggest, that one should not change the PCLKSELx registers after the PLL0 is connected. I take it, the initialization order is not easy to rework / implement? |
256000 did not help (lpc1769) |
baudrate 230400 is working with lpc1769 (skr1.4Turbo) |
Is their any reason the original commit can't be reverted? A recent youtube video showed how to connect a Pi Zero to the SKR boards via UART, and now we're getting a wave of support requests because it doesn't work at the default 250000 baud. |
FYI, I have put together a possible fix on the work-lpcuart-20210504 branch (commit 191c358). Unfortunately, I can't test this right now.
-Kevin |
Works for me:
|
P.S. might come handy for testing / flashing over the serial port (requires reset pin and boot pin to be connected to the RPI) flash.sh #!/bin/bash
pin_reset=22
pin_boot=26
firmware=$HOME/klipper/out/klipper.bin
sudo systemctl stop klipper
# enter boot bootloader sequence
gpio mode $pin_reset OUT
gpio mode $pin_boot OUT
# hold reset and bootloader down
gpio write $pin_reset 0
gpio write $pin_boot 0
# go back to high-z and let skr pullups set the lines to high
gpio mode $pin_reset IN
gpio mode $pin_boot IN
lpc21isp -wipe -bin $firmware /dev/ttyS0 230400 12000
sudo systemctl start klipper |
Tried it, worked for me with an skr 1.4 turbo. |
Tested with a SKR 1.4 Turbo connected to a Pi Zero W via UART -> i can confirm it is working. |
Tested with skr 1.4T and it's working well |
Thanks. I committed that change to the master branch (commit 45cd354). -Kevin |
I can also confirm working set SKR 1.4 turbo with RPi Zero W |
This ticket is being closed because the underlying issue is now thought to be resolved. Best regards, PS: I'm just an automated script, not a human being. |
Serial Communication with default settings (250000 baud) is not working starting with commit-id ae89a65
verified by bisecting twice resulting in the same identified change:
Testing-Environment:
reverting the ae89a65 against current master (8f9e497) restores the functionality.
The text was updated successfully, but these errors were encountered: