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

Hard limit causes crash when using SD Card #47

Open
gflaser-au opened this issue Oct 28, 2018 · 2 comments
Open

Hard limit causes crash when using SD Card #47

gflaser-au opened this issue Oct 28, 2018 · 2 comments

Comments

@gflaser-au
Copy link
Contributor

Hard limit ISR calls mc_reset, which calls file close if streaming gcode from an sd card file.
close attempts to take a lock which causes the crash (can't take a lock in interrupt context).

Unsure how best to attack this, but it would be nice to gracefully recover so a software reset could be issued to bring the machine back to operating state once the hard limit switch has been cleared.

Currently requires a hard reset / power cycle to recover.

@gflaser-au
Copy link
Contributor Author

PC: 0x400810c8: onStepperDriverTimer(void*) at C:\Users\V\AppData\Local\Temp\arduino_build_527734\sketch\stepper.cpp line 265
EXCVADDR: 0x00000011

Decoding stack results
0x4008fa24: invoke_abort at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/esp32/panic.c line 140
0x4008fc27: abort at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/esp32/panic.c line 149
0x40081725: lock_acquire_generic at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/newlib/locks.c line 141
0x40081851: _lock_acquire_recursive at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/newlib/locks.c line 169
0x400e5de1: VFSFileImpl::close() at C:\Users\V\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0\libraries\FS\src\vfs_api.cpp line 288
0x400e5d4b: fs::File::close() at C:\Users\V\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0\libraries\FS\src\FS.cpp line 136
0x400d3529: closeFile() at C:\Users\V\AppData\Local\Temp\arduino_build_527734\sketch\grbl_sd.cpp line 93
0x400d412b: mc_reset() at C:\Users\V\AppData\Local\Temp\arduino_build_527734\sketch\motion_control.cpp line 375
0x40080f69: isr_limit_switches() at C:\Users\V\AppData\Local\Temp\arduino_build_527734\sketch\limits.cpp line 53
0x40081261: __onPinInterrupt at C:\Users\V\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0\cores\esp32\esp32-hal-gpio.c line 219
0x4008188b: _lock_release_recursive at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/newlib/locks.c line 215 (edited)

@bdring
Copy link
Owner

bdring commented Oct 29, 2018

I will think about this. I agree you should be able to recover from the keyboard.

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