-
Notifications
You must be signed in to change notification settings - Fork 232
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
Add #define to support moving serial to UART1 #1246
Conversation
Thanks for the commit, I'm trying adding it to 4.3.0 branch but no way to get TX working, I moved your code to usart6 to enable the esp8266 serial comms but I get the same, receive is fine while transmit does not work. Any idea? Edit : Sorry I mean the buddy is able to send strings outside, the problems are the receive buffer. |
I can't say for sure without seeing your specific code changes, but the built-in Marlin is not equipped to handle the DMA receive interrupt or buffers by default (uartrxbuffer doesn't support the required functions that check whether data is available). Make sure you have disabled that for UART6, else the data will get shuttled away before it ever sees an RXNE flag. |
I'm getting the same problem even on uart1 by using Your commit, does it works on your side? |
Hmmm... I have not run it on real hardware but I do know it works on simulated hardware. |
Ah that's probably the reason, can You kindly address me a page that explains how to setup eclipse to debug this? Switching to another ide isn't a problem to me. |
Sorry, the hardware simulation is a (temporarily) private project that is not yet ready for public release. Eclipse's support for the STM32 platform is basically limited to GPIO and is not usable for this. |
ok no problem, in case You want to send me some bbf to test on a real device I'm here. Best Regards |
Thanks, I'll keep that in mind. My best guess why it many not work is probably some missing serial port/uart configuration since these ports are not used by default. |
Well, I understood what is the failure, setting in cutecom a delay of 2msec between each char allows the buddy board to successfully reading all chars. So this PR provides a functional but slow code, may be the switch to a buffer where data are appended by IT or DMA will be the solution then Marlin can pick one char at a time without the risk to skip something. |
That is possible but does require further work to uartrxbuffer to support checking the level. |
I found a working code for uart6, anyway unless this #1076 won't be implemented wireless serial interface is quite useless |
I'm happy to announce that said project being private is no longer the case, if you are still interested :) |
Sorry, this is a tangential question, but it seems like you'd know (and is potentially related in the sense that if 'yes', I'm also interested in configuring it differently): is the serial port hard coded to the micro USB on the Mini, in the released 4.3.1? I have an ESP8266 device connected and seemingly working (spewing gcode from Octoprint if I plug it into my computer instead of the Mini) but it has full-size USB type A only, and in that port of the Mini it can't connect. I then noticed the Octoprint guide mentions the Mini's micro USB port (which I hadn't even noticed it had until then, heh.) but doesn't say why / if that's the only one supported? The guide also expects you to be connecting a RPi directly, for which a USB A -> micro would be more natural I suppose, so I'm not sure if it's just an arbitrary choice; may as well leave the bigger port free for flash storage if you can sort of thing. I don't know (because I don't know the physical mapping of USART6?) if this is the same issue @Turro75 mentioned in #1246 (comment) above? Cheers. |
If I'm understanding your question correctly, then no, the full-size USB port does not support anything other than USB drives. It explicitly expects a mass storage device (can't even connect a hub) unless you make significant alterations to the firmware to swap the ports (and I'm not even sure if that would work given it lacks the 5th OTG sense pin to determine if the connection is supposed to be host or device-mode (in other words, who "owns" the bus) You might have some success with some variant of this though to adapt your ESP until such time as the internal port becomes usable: |
Great, thanks. Of course, I would've just checked it if I had/could've found an adapter like that, but wanted to confirm that was the issue before buying (and waiting for) one. Many thanks! |
No problem. Hopefully we'll see some ESP movement soon given the hints about PrusaConnect they've teased in recent livestreams :) |
@vintagepc Is this PR still relevant? If not, could it be closed? |
Closing, the changes are stale. |
This adds an alternate wiring option to route the serial output from USB to UART1 (the TX/RX pins on the white 10 pin header)
To use:
USE_UART1_SERIAL
inHardwareSerial.h
SERIAL_PORT
from-1
to1
inConfiguration_A3ides_2209_MINI.h