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

STM32F103 / STM32F407 boards should use on-chip USB support #117

Closed
ag88 opened this issue Oct 4, 2021 · 1 comment
Closed

STM32F103 / STM32F407 boards should use on-chip USB support #117

ag88 opened this issue Oct 4, 2021 · 1 comment

Comments

@ag88
Copy link

ag88 commented Oct 4, 2021

hi MKS,
Your boards are quite good, but STM32F103 / STM32F407 boards should use on-chip USB support instead of using a separate USB-UART

There is a problem, as seen in this PR for Marlin
MarlinFirmware/Marlin#22529
Because STM32F103 and STM32F407 UART only has a single byte buffer. When the microcontroller is busy it can skip bytes from the host. So it becomes necessary to increase interrupt priority for the UART, this comes at a cost to interrupts to other peripherals such as HardwareTimer which drives the stepper motors (there is a risk of skipping steps)

Both STM32F103 and STM32F407 has on-chip USB support, please revise your designs to use the on-chip USB rather than using a separate USB-UART bridge.

e.g. your MKS-Nano-V3 is correctly designed
https://github.com/makerbase-mks/MKS-Robin-Nano-V3.X
https://github.com/makerbase-mks/MKS-Robin-Nano-V3.X/blob/main/hardware/MKS%20Robin%20Nano%20V3.0_004/MKS%20Robin%20Nano%20V3.0_004%20SCH.pdf
pins PA11 USB D- and PA12 USB D+ goes direct to USB.
But please update your designs so that the Nano-V1 and Robin E3 etc
https://github.com/makerbase-mks/MKS-Robin-E3-E3D
https://github.com/makerbase-mks/MKS-Robin-E3-E3D/blob/master/hardware/MKS%20Robin%20E3%20V1.1_004/MKS%20Robin%20E3%20V1.1_004%20SCH.pdf
use pins PA11 USB D- and PA12 USB D+ goes direct to USB.

USB is a reliable protocol, if the host (PC) did not get a response, it would poll again and there is a ACK response. So it won't lose bytes. But UART is not a reliable protocol, the receiver needs to keep scanning RX or it would lose bytes.

@mks-viva
Copy link
Collaborator

mks-viva commented Oct 7, 2021

STM32F103 / STM32F407 boards BOOT0 pin should have jumper to VDD 3v3 #63

@mks-viva mks-viva closed this as completed Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants