-
Notifications
You must be signed in to change notification settings - Fork 1.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
Recent Port of Code from ESP32-C3 to ESP32-S3 Has Issues #2251
Comments
Follow-up I tried a different constructor for a "similar" display but one that specifies the clock and data through SW SPI: This produces a somewhat correct display - but "wraps" by 3 or 4 pixels. Also the graphics are VERY slow. I am going to do more digging. This seems to me like there may be an issue with the default hardware spi pins for this board. Follow-up I went into setup and had the board print the default SPI pins. I got: This seems to match the above and also matches the datasheet for the esp32-S3. |
Follow-up Tried a different esp32-s3 mini microcontroller (same brand) - screen still garbled. |
U8g2 will use the default pins from the Arduino Environment: Same pins as SPI object would use. |
Another difference between the esp32-S3 and C3 is the cpu clock speed (240MHz on the S3 vs 160 MHz on C3)...could that be relevant? Note I set the cpu speed at 160 MHz on the S3 and still didn't work....very frustrating. I am at a loss. Is there a way for me to easily bypass the constructor logic and specify CLK and data gpios for 4 wire HW SPI? |
Dumb question: Do I have to set pinMode for any of the SPI pins or does the constructor do that? I didn't have to do that before...reaching for straws. |
No, this is done by u8g2
If the display shows up with some content, then at least some communication has happend. I assume there is a wiring issue. Especially check the A0 (=CD) wire. In general: Avoid using such protoboards. They are very unreliable. |
I found the issue. It is not U8g2. This esp32-S3 dev board has an issue with GPIO13 being used for DC. It says on the datasheet this gpio13 is FSPIQ. Is this not typically MISO? I assumed that should be used for DC. In fact, U8x8lib.cpp has some comments where it looks like there is some confusion on the matter:
At any rate, I changed this pin to any other in the constructor and it seems to work. I would like to know if in general MISO != DC or if it is just this DEV board? Maybe someone can shed some light. I recommend leave the status OPEN for comments. Fish |
Like written in the comment, u8g2 does not require any information from the display. As a consequence the MISO input wire to the uC is not required. However some uC will occupy both MISO and MOSI pins once the hardware driven SPI is activated.
Indeed, it seems to be a SH1106 |
There are a couple of other pins used on the ESP32 in SPI...particularly for use of SPI with Flash memory like FSPIWP (write protect) and FSPIHD. Those do not seem to cause a conflict when used as DC output for the display...but I'm thinking if I have extra pins....maybe I avoid those as well? Ollie - sorry to cause a fuss. Your explanation makes perfect sense and has been a real learning experience for me. Thank you for all that you do! Fish |
Ollie:
I took that digital watch code I showed you and tried to port it to WEMOS Lolin ESP32-S3 mini controller and the display was a garbled mess. So I Started a new project and only ran the GraphicsTest.ino that comes with U8g2. It was also a garbled mess. I am using the following constructor:
U8G2_SH1106_128X64_NONAME_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=/ 10, / DC=/ 13, / reset=*/ 43);
I have checked to make sure all of the pins are correct -
CLK=12
MOSI=11
MISO=DC=13 (see constructor)
CS=10
Have you had any other issues with this board or with esp32-s3 in general? I checked the pins.arduino.h file as well and the default pins seem to match.
Any help is appreciated.
Fish
The text was updated successfully, but these errors were encountered: