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

[BUG] Disconnecting USB sometimes causes Archim to reboot #17444

Closed
marciot opened this issue Apr 8, 2020 · 5 comments
Closed

[BUG] Disconnecting USB sometimes causes Archim to reboot #17444

marciot opened this issue Apr 8, 2020 · 5 comments

Comments

@marciot
Copy link
Contributor

marciot commented Apr 8, 2020

Bug Description

Under a very specific set of circumstances, disconnecting the USB will cause the Archim board to crash some time in the future.

My Configurations

Required: Please include a ZIP file containing your Configuration.h and Configuration_adv.h files.

config.zip

Steps to Reproduce

  1. Connect to Archim via the serial port using PuTTY (or some other host software)
  2. Issue "M155 S1"
  3. Pull the USB cable (without disconnecting host)
  4. Wait for a minute or two.

Expected behavior:

The board should continue to work.

Actual behavior:

The board may spontaneously reboot after a couple dozen seconds. This does not always happen, but it happens frequently enough to be noticeable.

It's worth mentioning that if you quit PuTTY or disconnect prior to pulling the USB cable, then the crash will not happen. It seems to be related to forcefully breaking a connection and data being written to the serial port after the connection is broken (hence the M155 S1)

@thinkyhead thinkyhead added Bug: Potential ? C: Serial Comms Needs: More Data We need more data in order to proceed labels Apr 8, 2020
@thinkyhead
Copy link
Member

thinkyhead commented Apr 8, 2020

Since the host will be disconnected, see if you can log to the SD card or simply to the screen. What you want to narrow down is the exact point in the code flow where the crash is occurring, so having a complete log isn't essential.

@marciot
Copy link
Contributor Author

marciot commented Apr 8, 2020

I just tried enabling a log but the log file is completely empty. Not even sure if the log to SD works with the USB flashdrive code. This is the first I've learned of this feature.

@marciot
Copy link
Contributor Author

marciot commented Apr 8, 2020

In case the USB hardware was getting in the way, I swapped out my USB module with an SD module and tried new firmware with SD_SUPPORT. I was able to reproduce the crash, but the log file is also empty.

Incidentally, I notice the updates from M155 S1 aren't getting logged. Is this intended? What is and what isn't logged?

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label / comment or this will be closed in 5 days.

@github-actions
Copy link

github-actions bot commented Oct 3, 2020

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants