-
Notifications
You must be signed in to change notification settings - Fork 33
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
STM32G0B1RE MCU issue with multiple drivers using one UART #45
Comments
What error message does it give you, that the second driver is not communicating? Do you have an oscilloscope? It would be interesting to look at the UART line and see what is happening with the signals from both drivers. Can you try increasing the reply delay to see if that helps? The maximum reply delay is 15. Are you going to control these drivers with step and direction signals? It is possible that unidirectional communication is working properly but there is interference in the bidirectional communication. You may be able to set values in each driver and then drive them successfully with the step and direction signals even with the error about it not communicating properly. |
Sorry Peter, I should have mentioned in my post that the second driver continually reports as "communicating but not setup". I have attempted to use a larger reply delay of 10 and 15 however that didn't help. Controlling the drivers using step and direction signals works fine. To confirm I have the hardware wired up correctly, I used an alternate library (the TMCStepper library) which shows bidirectional UART is working fine to both drivers. |
Oh, that is very useful information, thanks. I may have figured out the problem. I made a change and updated the version to 9.0.7. Is it possible for you to try this version and tell me if the problem still exists? |
Hi Peter, I tried version 9.0.7 however the issue still remains. |
Can you please try using the alternate pins when setting up each driver and see if that helps? Like this:
Edited: this code does not work for STM32 only ESP32 |
I will have to dig into the stm32duino code to see if I can figure out how to fix it for you. I might not have a chance to get to it until after the holidays, but I will keep you posted. Thanks for the updates.On Dec 22, 2023, at 19:11, AaronH ***@***.***> wrote:
Hi Peter, I have tried adding the pins as you suggested and received the following error:
image.png (view on web)
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
I am looking at the stm32duino code and I do not see anything that should cause it to fail. There may be a subtle bug in the way they begin or end their hardware serial port, but I am not sure right now what I can do with this library to work around that. |
I have the same issue. I can only communicatie with driver with address 0 |
Hi all, I've been attempting to configure two 2209 stepper drivers sharing a single UART on an STM32G0B1RE based board (using the stm32duino framework) and have come across an issue initialising both drivers.
The code below is what I am testing with. I can successfully communicate to stepper_driver1 fine, but not stepper_driver2, however if I change the order of the driver setup (put stepper_driver2 before stepper_driver1) in the setup function then stepper_driver2 communicates fine, but stepper_driver1 does not.
In addition, both drivers communicate fine if I keep the drivers powered up, then flash the controller with stepper_driver1 setup before stepper_driver2, then reflash the controller with stepper_driver2 setup before stepper_driver1 (keeping the drivers powered up the whole time).
Any help would be greatly appreciated!
The text was updated successfully, but these errors were encountered: