-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[ 707][E][esp32-hal-gpio.c:95] __pinMode(): Invalid pin selected #1767
Comments
In the Arduino world an I/O pin number of -1 is OK to signify to a function that a pin allocation is not wanted, but for low level calls it can throw a warning. |
I tried to remove the number completely but then, many functions get crazy (like: "give me the number or so!") |
The SPI port can operate in half duplex mode so MOSI and MISO are on same pin. So maybe try setting MISO and MOSI to pin 4. |
@homonto, I am thinking about assigning TFT_MISO = TFT_MOSI if TFT_MISO is not defined. Can you test that works OK in your setup. |
@Bodmer just tell me what to do please: simply do it this way:? Compile and report back? ;-) I can do it for both ILI9341 320x240 and ST7789 240x240
|
Yes, that is exactly right, thanks. |
This link is interesting: Looks like valid GPIO for the ESP32 S2 are 0-21 and 26-46. |
that is why, when I used MISO=40 it worked as I am not using JTAG: |
All looks good, no more testing needed. Thank you. |
topic closed I think as solution provided ;-) |
Great, thanks again. |
Master repository updated. |
I have tried several different pins on my touch display and all of them have worked, I finally decided to solder everything and now I am getting that error, it seem to be running fine as when I touch on the screen It is logging the coordinates just the display is black, don't know if its just the LED / BL pin that is coincidentally connected to a READ ONLY PIN. FML
|
hi Bodmer,
My pins are defined in custom config this way:
Whenever I start the program it shows me this error:
Funny thing: all works.
I narrowed down that this message comes from: esp32-hal-spi.c - it is repeated there many times - see here: https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-spi.c
the moment I change "-1" in unused pins (TFT_CS and TFT_MISO) and put i.e. "40" (that does not exist btw on ESP32-S2), there is no more error
Is that a bug or so?
Apparently "-1" is not the best option if one wants to have clean code without warnings
thx
The text was updated successfully, but these errors were encountered: