Open paolovr70 opened 4 years ago
Hi Paolo.
There is not a lot of help or information about this specific module (the T8) because there is nothing special about it really. It is wired like most other ESP32 modules and thus can be used like any other module. Only difference is the SDCard slot which is actually wired in SPI mode like shown on the schematic and not like advertised.
Hi Paolo.
* According to the schematic, blue is for battery charge, red is the 3v3 power, and green is wired to IO21. * Schematic is in this repository, but the version changes are not pushed here. The pinout is the same as other official ESP32 modules. * You can use any pin as I²C with the ESP32. GPIOs are actually very flexible. Refer to the ESP32 datasheet.
There is not a lot of help or information about this specific module (the T8) because there is nothing special about it really. It is wired like most other ESP32 modules and thus can be used like any other module. Only difference is the SDCard slot which is actually wired in SPI mode like shown on the schematic and not like advertised.
Can it run in 1bit mode? Because I have the same board but the first call to SD_MMC.begin("/sdcard", true) always fail. Second call works. Tried with a different SD card and reduced the cpu freq but the same results.
I'm using the ESP-IDF and thus don't know anything about the specifics of the arduino implementation.
Remember, the SDCard is wired as an SPI device, so it is one bit. There might be a way to tell SD_MMC to initialize as an SPI SD.
The T8 board is missing two data line to work in 4-bits mode. So it might work with the SDMMC Driver with 1-bit width. However, I remember having had issues with the SDMMC driver and switched to the ESP-IDF SD SPI Host Driver.
@tionebrr could you please clarify this
Remember, the SDCard is wired as an SPI device, so it is one bit
aren't you trying to say that an SD card will work only in 1-bit width mode for this board while using the SD-MMC driver?
@dizcza You're right, sorry for the confusion. I re-checked the docs and it should work in SDMMC 1-bit mode. I edited my previous comment.
@tionebrr thank you for the clarification. It did help because I thought I was doing something wrong by not being able to mount an SD card with the 4-bit operation mode.
BTW, shouldn't this issue be closed? It has been answered fairly in the first comment. The author perhaps was wondering whether the LED will be blinking if IO21 pin is used as SDA with some I2C-connected device. In either case, you can't use it as LED with active I2C communication going through this pin.
Let me also answer another question posted here to quantify it's fully resolved. @hasaranga you had the following problem:
... I have the same board but the first call to SD_MMC.begin("/sdcard", true) always fail. Second call works.
It's because a pull-up resistor is missing on D0 line (as in many other variants of an ESP32 board). You can do either a hardware fix (pulling up a 10 kOhm resistor to pin "2") or a software fix. The software fix is to call pinMode(2, INPUT_PULLUP);
prior to initializing the SD card. Below is a working example of using SDMMC driver with TTGO T8 in Arduino IDE with the latest esp32 library installed (v1.0.6; I've not checked v2.0.0 yet).
@tionebrr could you also clarify
You can use any pin as I²C with the ESP32
Clearly, we cannot use any GPIO pin as I2C, can we? There are only two I2C according to the seller information. One is at 21 & 22 pins. Where is the other? (I'd like to keep pin 21 for LED.) Thank you.
@dizcza Not really any indeed. You can't use an "input only" pin for SDA for example. There are two I2C peripherals in the ESP32 but they are behind a GPIO Mux. You can route most ESP32 internal peripherals to any GPIO. The GPIO Muxing however introduces a timing constraint (because it's clocked by the APB at 80MHz), so some peripherals (SPI, Ethernet, SDMMC etc...) are better locked to a specific set of pins.
I²C is obviously tolerant enough and can be routed anywhere.
You can check the list in the datasheet page 37.
Also I agree that this issue should be closed. The LilyGo folks does not seem to be monitoring this repository.
Dear All, where can I find a pinout of the board? (on the site producer there is no schematic). There are 3 leds on board. One is for battery, but the other two? Are there problems if I need to use I2C and one of the leds is connected to 21/22 pins (which are the hardware I2C pins)? Thanks. paolo