Comments (12)
from klipper.
Very easy. Hacked the serial.c as you suggested, made a section pointing to uart2 and bingo, it works. Seems a bit hackish to redefine the registers, but hey..
I might try to clean up the code and make you pull request, still not quite sure I fully understand whats going on there.
And yes, level shifters are indeed needed between RPi and ramps stack.
from klipper.
from klipper.
That sounds pretty cool. Does it provide better speed or just better stability?
@MortenGuldager If you can get a tutorial on how to do this, that would be highly appreciated! :)
Thanks!
from klipper.
@MortenGuldager can you post you hacked serial.c? I am trying to do the same but I got errors:
INFO:root:Starting serial connect
WARNING:root:got {'count': 40, '#receive_time': 1203.450843292, '#name': 'identify', '#sent_time': 0.0, 'offset': 0}
WARNING:root:Timeout on serial connect
from klipper.
For those of you asking for my crude hack, here is what my git diff tells me about it:
pi@octopi014:~/klipper $ git diff src/avr/serial.c
diff --git a/src/avr/serial.c b/src/avr/serial.c
index 10b9599..432dd50 100644
--- a/src/avr/serial.c
+++ b/src/avr/serial.c
@@ -24,9 +24,44 @@ static uint8_t transmit_pos, transmit_max;
* Serial hardware
****************************************************************/
+
+#undef UCSR0A
+#undef UCSR0B
+#undef UCSR0C
+#undef UBRR0
+#undef UDR0
+#undef UCSZ01
+#undef UCSZ00
+#undef U2X0
+#undef RXEN0
+#undef TXEN0
+#undef RXCIE0
+#undef UDRIE0
+#undef USART0_RX_vect
+#undef USART0_UDRE_vect
+
+#define UCSR0A UCSR2A
+#define UCSR0B UCSR2B
+#define UCSR0C UCSR2C
+#define UBRR0 UBRR2
+#define UDR0 UDR2
+
+#define UCSZ01 UCSZ21
+#define UCSZ00 UCSZ20
+#define U2X0 U2X2
+#define RXEN0 RXEN2
+#define TXEN0 TXEN2
+
+#define RXCIE0 RXCIE2
+#define UDRIE0 UDRIE2
+#define USART0_RX_vect USART2_RX_vect
+#define USART0_UDRE_vect USART2_UDRE_vect
+
+
DECL_CONSTANT(SERIAL_BAUD, CONFIG_SERIAL_BAUD);
// Define serial port registers on AT90USB1286
+/*
#if !defined(UCSR0A) && defined(UCSR1A)
#define UCSR0A UCSR1A
#define UCSR0B UCSR1B
@@ -49,6 +84,7 @@ DECL_CONSTANT(SERIAL_BAUD, CONFIG_SERIAL_BAUD);
#define USART0_RX_vect USART_RX_vect
#define USART0_UDRE_vect USART_UDRE_vect
#endif
+*/
void
serial_init(void)
I would appreciate if someone a bit more structured than me cleaned it up so it could enter the official klipper codebase.
from klipper.
Thanks it works but I find out that you can use direct UART0 from AUX0, so for my it isn't necessary.
from klipper.
Does anyone know if anyone is building the hardware required for this? Best I can tell this would be ideal but is not being produced. https://github.com/j-laird/Printrboard-Pi-Link
from klipper.
@mikedahlgren checkout RAMBO Einsy 1.1 (used in prusa mk3) I think it has rpi zero link underneath.
from klipper.
I'm going to close this issue as it doesn't appear anyone is actively working on implementing it.
from klipper.
@KevinOConnor Will this give any performance, or just free up an USB? And what connection do I need to get fastest possible speed between Raspberry PI4 and the 3D Printer board?
from klipper.
Selecting the UART on the AVR platform was added long ago. It's not at all related to performance.
-Kevin
from klipper.
Related Issues (20)
- [FR] CANbus for LPC176x boards HOT 1
- issuses with gd32f303 chip on ender3 v2 neo HOT 1
- Unable to connect HOT 1
- Deadlock when using exclude_objects containing umlaut. HOT 4
- Ender 3, Klipper/Mainsail no longer booting HOT 1
- Request for a command to wait for a variable update HOT 1
- X axis movement inverted after TUNING_TOWER command for pressure advance configuration HOT 1
- MCU Problem HOT 4
- Ender 3 S1/Pro min_mesh value too high HOT 2
- ADC out of range issue and improvements HOT 1
- [Enhancement] M300 Support HOT 1
- Mks robin nano v3 provides only 150k steps per second HOT 1
- Wrong information about generating hex because its generating binary file HOT 1
- Apparent regression in variable PA HOT 6
- Hi, is last_stoep_clock a uint64_t value or a uint32_t one? or it's by designed to converted from uint64_t to uint32_t inexplicitly? HOT 1
- Probe pin out in Octopus Pro v1.1 HOT 1
- Manta m5p endstop stuck on HOT 1
- Klipper fails to build with Apple's cpp HOT 19
- Klipper flashing but not responding on the GTM332 Mini S HOT 1
- Hardcoded path in src/linux/main.c for sched.h HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from klipper.