-
-
Notifications
You must be signed in to change notification settings - Fork 375
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
Problem: ESP32 crashes while I add motor1 section for any axe #630
Comments
The problem is the use of gpio.7 as a direction pin. That pin is already used for accessing the module's SPI FLASH. When you configure it, FluidNC changes the setup of that pin and then the system cannot access its code in FLASH, causing a crash. Please consult the ESP32 pin reference to learn which pins can and cannot be used. I will try to improve the error message for this condition. |
Also improved the readability of the associated error message by reducing verbosity, and eliminated the backtrace on assertion failures. It is rarely possible to decode the backtrace in common usage, and not particularly useful even when it can be decoded.
Can't I use these pins for my needs? This is bad because the board I'm using won't work. |
But in earlier versions FluidNC, these pins could be successfully used to connect to motor drivers. I just want to find out specifically why they can't be freely used now. Is this a temporary solution and will it be fixed later? Or will I have to make another board to use the new firmware versions? |
I do not think it is possible that earlier versions could use those pins. GPIO7 is connected inside the ESP32 metal can to the D0 (main data) line of the SPI FLASH chip. If you interfere with that line in any way, the ESP32 will be unable to fetch code from that FLASH and it will crash. This is not specific to FluidNC. There are references all over the Internet that say the same thing - you cannot use those pins because they are already used for the critical purpose of communication between the microprocessor and the FLASH that stores the program code. Here is one such reference In order for me to believe that earlier versions of FluidNC could use those pins, you would have to show the schematic for your board, identify the specific version of FluidNC where it worked, show us the config file that worked with that version, and show a video of it working. |
Here is the Espressif manual for the old ESP32-WROOM-32D module: It clearly states that those pins are used for SPI FLASH Here is a the Espressif manual for a more current ESP32-WROOM-32E module It says that, in the current versions of the module, those pins are not even connected to the outside of the module |
Handle reserved GPIOs without crashing - #630
Thanks for the detailed answer. When I began to understand and looked at the electrical circuit of the control board, I remembered what was the matter. On my board, the DIR pins of two motors of the same axis are connected to the same pin of the ESP32. A year ago, I asked how to make FluidNC work in such a situation, because if specify the same pins or do not specify them, it would cause an error. You advised me to configure some unused direction_pin for the second motors. Well, I randomly chose just these reserved pins for SPI FLASH =) But probably, after the version of the framework was updated, this trick stopped acting. Now I just specified NO_PIN (apparently during this time such an opportunity was added to the firmware) and everything worked. |
Also improved the readability of the associated error message by reducing verbosity, and eliminated the backtrace on assertion failures. It is rarely possible to decode the backtrace in common usage, and not particularly useful even when it can be decoded.
Controller Board
Grbl ESP32 MPCNC Controller
Help From Board Vendor
Machine Description
Input Circuits
No response
Configuration file
Startup Messages
User Interface Software
No response
What happened?
ESP32 crashes while I add
motor1
section in config. One has only to writenull_motor:
in this section, and everything starts working.I tried version v3.6.1 and v3.6.0. In version 3.4.5 the same config file works well.
Other Information
No response
The text was updated successfully, but these errors were encountered: