-
Notifications
You must be signed in to change notification settings - Fork 2.1k
boards/esp32: add TTGO T-Beam board definition #11418
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
Conversation
cd5b59c
to
128838e
Compare
v2 changes: remove optional Arduino support |
Does anyone have a board to test on? |
This is a nice board but I don't know if we can get it in for this release. I can try to add it to the wishlist. |
I also think @gschorcht is super busy right now. |
In fact, there is no functional difference between this board definition and the board definition in PR #11265. Although there is a GPS receiver integrated on this board while there is a display on the board in PR #11265, both components are connected via peripheral interfaces and are not used in the board definitions. The only real difference is the mapping of the GPIOs to the peripheral interfaces. So the question for me is whether it would be enough to test LoRa functionality with one of these boards and to double check the GPIO/peripheral mapping in the source code. All other functionalities are the same as for any other ESP32 board. |
128838e
to
5dcbcce
Compare
v3 changes:
@gschorcht I have just mapped three Arduino pins (UART RX/TX and the LED pin). Is it sufficient for now? |
I have ordered the board and I hope that I will have it on Wednesday. I will test the PR later this week. |
@gschorcht great, thanks. I'm trying to implement TTN-Mapper for RIOT (https://github.com/yegorich/ttn-mapper-riot). For now it can only read and parse GPS frames but it should be sufficient for GPS/UART testing. |
### <a name="pinout"> Board Pinout </a> [[TOC](#toc)] | ||
|
||
The following figure shows the pinout of the defined default configuration for TTGO T-Beam boards. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a reference to schematic here.
The corresponding board schematics can be found [here](https://....) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've found schematics for V1.0 here. But there is at least a confusion about LoRa RST signal. According to the pinout picture is it IO14 but in schematics it seems to still be IO23 as in rev1. How is it really connected on your board?
As for rev1 I'll take this one though it seems to be for rev0 but it is almost the same except for LED on IO14.
* purposes. | ||
*/ | ||
#ifndef ADC_GPIOS | ||
#define ADC_GPIOS { GPIO36, GPIO39, GPIO32, GPIO33, \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any reason for the order, just the pinout? Especially GPIO36 and GPIO39 are not the first choice for ADC channels since they have connected capacitors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have reordered the GPIOs and removed GPIO36 and GPIO39.
It seems that I have another version of the board. I don't have a LED at GPIO14. It seems that I don't have a LED at all. I have 3 buttons Tested successfully:
SPI can't be tested with external hardware since the according GPIOs are not broken out. However, in |
@gschorcht thanks for review. Seems like I have the rev0 version (https://www.banggood.com/LILYGO-TTGO-T-Beam-ESP32-433868915Mhz-WiFi-Wireless-bluetooth-Module-p-1320390.html) that provides LED and according to this README (https://github.com/kizniche/ttgo-tbeam-ttn-tracker/blob/master/README.md) they have different pinouts including GPS. Looks like we have to differentiate them. |
Have I mixed up the UART pins for 1.0 board? If I invoke
|
Tested again:
I'm still not happy that |
No, GPIO34 can be only an input. That is it has to be RX. I don't get anything:
|
According to NEO-6M datasheet, it can operate at the following baud rates: 4800, 9600, 38400 and 57600. The baud rate will be configured via |
There is nothing. If it would be a problem of baudrate, at least some garbage should be printed out. I can't see anything with logic analyzer too. It seems that the NEO-6M has no power. It is provided as GPS_VDD by the AXP192. Maybe, the AXP192 has to be programmed. It is also connected to I2C bus. I suppose, this produces also the problems with the SHT3x. Maybe, they use the same address. I will have to take a look into the software in TTGO repository. |
Indeed, the AXP192 is an I2C slave with address 0x34 and has to be programmed. It seems that the different power outputs LDO2 and LDO3 can be programmed. Maybe they are off by default. |
Enabling on-board modules is something that would have to be done in board's |
Hm.. in order to enable the LDOs, we need to implement a driver for AXP192 link this library does. Perhaps we should split the effort: I rework this PR to support rev0 and rev1 and just mention the upcoming support for V1.0 and then you can make a followup PR with the full V1.0 support? Or we leave it as is and add LDO/GPS support later? |
Principially, it shouldn't be a big thing. One small I2C transaction to write one register should be enough to switch on the GPS. I can try it later today. That is, the board definition for V1.0 would use |
OK, that are the results after I wrote a
I'm bad in interpreting the NEMA data. We should have a driver for it. |
Since we had only Therefore, I would suggest that we merge this PR as it is. I will than provide my changes as a separate PR. Would this be OK for you. Alternatively, I could provide my changes to your branch. |
It could be further refined in that way that the GPS module is nonly switched on, if the driver module for the NEO-6M module is used. BTW, I guess that the driver module would be not NEO-6M specific. Rather the driver would be a UART-based driver that interprets NMEA messages. |
The last problem we should discuss before we merge is why the board has problems with SHT3x sensor. |
I'm for merging this PR as is. Let me know when I can squash it. |
Have you tried any I2C device with your board? |
Yes, I've attached the BME280 sensor. But it was long time ago and with Arduino IDE. I'm now trying to run the |
It might be a problem with the pull-ups. In contrast to other boards, the TTGO board has external pull-ups. The SHT3x sensor module I use has also 4.7 kOhm pull-ups. And the I2C peripheral driver uses of course OD outputs with enabled pull-ups of 4.7 kOhm. So we have 10 kOhm pull-ups on TTGO board in parallel to the 4.7 kOhm pull-ups of the ESP32 and the 4.7 kOhm pull-ups of my SHT3x. The overall pull-up is then about 2 kOhm. BTW, there are other drivers that do not work in I2C fast mode, e.g., |
My BME280 board seems to be dead. I couldn't talk to it neither via TTGO nor via NUCLEO-F103RB. But I've connected TTGO board directly to the NUCLEO-F103RB and run the ROBOT tests. The results were the same as in the nightlies. |
My guess is still that the I2C problem with various sensors is related to the pull-up configuration, which has nothing to do with the board definition in this PR. I wonder if we should make the pull-ups configurable in ESP32 to catch problems as with this board. Lets say we define a pseudomodule Anyway, let's continue with the board definition as it is. Please squash. |
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
d09b2a6
to
8101f52
Compare
Squashed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK
Nice job everyone... Now I need to get that board 😄 |
@gschorcht @MrKevinWeiss thanks for your help! |
Contribution description
This PR adds the board definition for TTGO T-Beam board. TTGO T-Beam is an ESP32 development board with 4 MB Flash that uses the EPS32 chip directly. It integrates
Many GPIOs are broken out.