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

Issue with USB #12

Open
mstrens opened this issue Mar 25, 2019 · 14 comments
Open

Issue with USB #12

mstrens opened this issue Mar 25, 2019 · 14 comments
Labels
bug Something isn't working

Comments

@mstrens
Copy link

mstrens commented Mar 25, 2019

When I configure GRBL with USEUSB (so using USB and not UART1), it seems that USB connection locks if I send a Soft Reset or if I push on the Reset button on the blue pill.

I faced this issue following e.g. this process:

  • I connect blue pill to pc via USB
  • I open a serial terminal session (e.g. using arduino Terminal).
  • I can sent commands to GRBL (e.g. "?" to know the status and position)
  • If GRBL reach a hard limit (those are activated in my configuration), GRBL sent ALARM:1
  • To unlock GRBL you normally have to send a Soft Reset (CTRL+X or 0X18). If I try this, GRBL does not react.
  • even a hard reset pressing the reset button on the blue pill does not unlock GRBL communication.
  • To continue, it seems that I have to close my terminal session (even close the program) and reopen it.

When I work with a UART connection between PC and blue pill, GRBL reacts (as expected) after a soft reset.

Do you experience the same issue?

@robomechs
Copy link
Owner

robomechs commented Mar 26, 2019

Hmm((
It's look like the same issue:
http://www.chibios.com/forum/viewtopic.php?t=1727
Unfortunately
Mybe this is the (hardware) decision:
https://stackoverflow.com/questions/54939948/stm32-usb-cdc-after-hardware-reset

@robomechs
Copy link
Owner

UV5
46d843

@robomechs
Copy link
Owner

robomechs commented Mar 26, 2019

I'll try it later. (Remove R10 resistor, use bluepill board with external pull-up resistor with toggling mosfet transistor driven by PC14 or 15 for example)

@robomechs robomechs added the bug Something isn't working label Mar 30, 2019
@Alfrederson
Copy link

You need to close the serial connection before restarting the bluepill. It's not like an arduino where hitting the reset button resets just the MCU and the usb-serial chip stays connected.

@troth530
Copy link

troth530 commented Feb 4, 2020

I have the same issue and possibly more issues. I have removed 10k resistor and installed a 1.5k for the usb, but I cannot soft reset after an alarm (limit switch is triggered) and reset button does not bring it back up. Same issue seen on multiple sources of blue pill and black pill (robotdyn). Maybe a dumb question @Alfrederson , but how do I close the serial connection, then reconnect? Also I see this issue also on @mstrens branch. I think it's a blue pill/grbl issue.

Many thanks!

@misan
Copy link

misan commented Feb 4, 2020 via email

@troth530
Copy link

troth530 commented Feb 4, 2020

@misan no, I cannot get Ctrl+X to work on blue pill or back pill (STM32f103C8). Reset button does not work either. I basically have to unplug from USB, then plug in again and recently need to reboot the entire PC. Can sometimes get $X to work to clear an alarm, but soft reset has never worked. Not sure if I've damaged my hardware or what.

@Alfrederson
Copy link

Alfrederson commented Feb 5, 2020

I have the same issue and possibly more issues. I have removed 10k resistor and installed a 1.5k for the usb, but I cannot soft reset after an alarm (limit switch is triggered) and reset button does not bring it back up. Same issue seen on multiple sources of blue pill and black pill (robotdyn). Maybe a dumb question @Alfrederson , but how do I close the serial connection, then reconnect? Also I see this issue also on @mstrens branch. I think it's a blue pill/grbl issue.

Many thanks!

Just pull the USB cord and plug it back in. Pushing the reset button on the bluepill itself does the same, but you need to close your host before.

EDIT: by close the serial connection, I mean in the GRBL host on the PC. The rest (pushing reset button or unplugging or plugging) still apply

@troth530
Copy link

troth530 commented Feb 5, 2020

@Alfrederson. Thank you. I will try closing the software accessing grbl on the PC, then the reset button on Blue Pill/Black Pill and see if it comes back up. Sounds like this is a STM32 issue that cannot be remedied in Firmware.

I should probably also mention that I really appreciate all the hard work that goes into the development and if no one thanks you for all of your hard work, then shame on them!

@troth530
Copy link

troth530 commented Feb 6, 2020

I verified that if you close the software host you can then disconnect the USB and reconnect to do a hard reset, but the reset button does nothing to clear the alarm and bring it back out of the alarm state.

Hard reset seems like it's overkill for a basic alarm like triggering a limit switch. Should I open another issue because this does not seem USB related.

@Alfrederson
Copy link

I verified that if you close the software host you can then disconnect the USB and reconnect to do a hard reset, but the reset button does nothing to clear the alarm and bring it back out of the alarm state.

Hard reset seems like it's overkill for a basic alarm like triggering a limit switch. Should I open another issue because this does not seem USB related.

If it's just an alarm, can't you just unlock it through your GRBL host? Mine starts in alarm mode and I unlock it, no need to reset or anything. I think it's a compilation option to have GRBL start in alarm mode.

@troth530
Copy link

@Alfrederson, how exactly do you unlock it. I cannot get Ctrl-x (ctrl key + x) to work and I cannot get $X to work either.

@robomechs
Copy link
Owner

I suppose it can be fixed only by hardware.

@troth530
Copy link

@Alfrederson if it starts in alarm state homing can be done to get it out of alarm state, I think it's Alarm 9 in that case. If I recall it does not require Ctrl-X, just needs to go through the homing cycle. The issue is on hitting a limit switch after homing it gets in an alarm state Alarm 1 and latches up.

@robomechs, thanks for looking into it. Disconnect from PC and pulling control_reset_bit low does ensure it can come out of alarm state. Using the reset button does not work.

I still believe something can be done if you can try to repeat this setup you'll have a better chance to debug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants