boards: lilygo: ttgo_lora32: enable SDHC support
device tree: enable support for the SDHC controller to use the micro SD card slot documentation: - added instructions for SD card and OLED samples - added links to code samples defconfig: added CONFIG_ESP32_USE_UNSUPPORTED_REVISION=y to ttgo_lora32_esp32_procpu_defconfig The chip on the board is a ESP32 chip revision 1. The board will not boot, it displays the following warning at boot: I (35) boot: chip revision: v1.0 E (38) boot: You are using ESP32 chip revision (1) that is unsupported. While it may work, it could cause unexpected behavior or issues. E (50) boot: Proceeding with this ESP32 chip revision is not recommended unless you fully understand the potential risk and limitations. E (62) boot: If you choose to continue, please enable the 'CONFIG_ESP32_USE_UNSUPPORTED_REVISION' in your project configuration. E (73) boot: HW init failed, aborting In order to prevent a boot loop, CONFIG_ESP32_USE_UNSUPPORTED_REVISION=y was added to the defconfig. Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
This commit is contained in:
parent
58df2533bb
commit
e7c3434685
6 changed files with 47 additions and 24 deletions
|
@ -39,13 +39,13 @@ of the Lilygo TTGO LoRa32 board.
|
||||||
+------------------+-------------------------------------------------------------------------+
|
+------------------+-------------------------------------------------------------------------+
|
||||||
| Power Switch | Sliding power switch. |
|
| Power Switch | Sliding power switch. |
|
||||||
+------------------+-------------------------------------------------------------------------+
|
+------------------+-------------------------------------------------------------------------+
|
||||||
| LCD screen | Built-in OLED display \(`SSD1306`_, 0.96", 128x64 px\) controlled |
|
| OLED display | Built-in OLED display \(`SSD1306`_, 0.96", 128x64 px\) controlled |
|
||||||
| | by I2C interface |
|
| | by I2C interface |
|
||||||
+------------------+-------------------------------------------------------------------------+
|
+------------------+-------------------------------------------------------------------------+
|
||||||
| SX1276/SX1278 | LoRa radio frontend chip, connected via SPI. |
|
| SX1276/SX1278 | LoRa radio frontend chip, connected via SPI. |
|
||||||
| | Use SX1276 for 433MHz and SX1276 for 868/915/923MHz. |
|
| | Use SX1276 for 433MHz and SX1276 for 868/915/923MHz. |
|
||||||
+------------------+-------------------------------------------------------------------------+
|
+------------------+-------------------------------------------------------------------------+
|
||||||
| TF card slot | TF card slot wired to the SD interface of the MCU. |
|
| TF card slot | TF card slot wired to the SDHC interface of the MCU. |
|
||||||
+------------------+-------------------------------------------------------------------------+
|
+------------------+-------------------------------------------------------------------------+
|
||||||
|
|
||||||
|
|
||||||
|
@ -195,30 +195,15 @@ message in the monitor:
|
||||||
***** Booting Zephyr OS vx.x.x-xxx-gxxxxxxxxxxxx *****
|
***** Booting Zephyr OS vx.x.x-xxx-gxxxxxxxxxxxx *****
|
||||||
Hello World! ttgo_lora32
|
Hello World! ttgo_lora32
|
||||||
|
|
||||||
LoRa samples
|
Code samples
|
||||||
============
|
============
|
||||||
|
|
||||||
There are two LoRa samples that will work out of the box with this board.
|
The following sample applications will work out of the box with this board:
|
||||||
|
|
||||||
To build the LoRa transmit sample application using sysbuild use the command:
|
* :zephyr:code-sample:`lora-send`
|
||||||
|
* :zephyr:code-sample:`lora-receive`
|
||||||
.. zephyr-app-commands::
|
* :zephyr:code-sample:`fs`
|
||||||
:tool: west
|
* :zephyr:code-sample:`character-frame-buffer`
|
||||||
:zephyr-app: samples/drivers/lora/send
|
|
||||||
:board: ttgo_lora32/esp32/procpu
|
|
||||||
:goals: build
|
|
||||||
:west-args: --sysbuild
|
|
||||||
:compact:
|
|
||||||
|
|
||||||
To build the LoRa receive sample application using sysbuild use the command:
|
|
||||||
|
|
||||||
.. zephyr-app-commands::
|
|
||||||
:tool: west
|
|
||||||
:zephyr-app: samples/drivers/lora/receive
|
|
||||||
:board: ttgo_lora32/esp32/procpu
|
|
||||||
:goals: build
|
|
||||||
:west-args: --sysbuild
|
|
||||||
:compact:
|
|
||||||
|
|
||||||
Debugging
|
Debugging
|
||||||
*********
|
*********
|
||||||
|
|
|
@ -41,5 +41,11 @@
|
||||||
output-high;
|
output-high;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
sdhc0_default: sdhc0_default {
|
||||||
|
group1 {
|
||||||
|
pinmux = <SDHC0_CD_GPIO34>;
|
||||||
|
bias-pull-up;
|
||||||
|
output-high;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -24,4 +24,5 @@ testing:
|
||||||
- cmsis_rtos
|
- cmsis_rtos
|
||||||
- jwt
|
- jwt
|
||||||
- zdsp
|
- zdsp
|
||||||
|
- sdhc
|
||||||
vendor: lilygo
|
vendor: lilygo
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
uart-0 = &uart0;
|
uart-0 = &uart0;
|
||||||
i2c-0 = &i2c0;
|
i2c-0 = &i2c0;
|
||||||
watchdog0 = &wdt0;
|
watchdog0 = &wdt0;
|
||||||
|
sdhc0 = &sdhc1;
|
||||||
lora0 = &lora0;
|
lora0 = &lora0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -28,6 +29,7 @@
|
||||||
zephyr,flash = &flash0;
|
zephyr,flash = &flash0;
|
||||||
zephyr,code-partition = &slot0_partition;
|
zephyr,code-partition = &slot0_partition;
|
||||||
zephyr,display = &ssd1306_128x64;
|
zephyr,display = &ssd1306_128x64;
|
||||||
|
zephyr,sdhc = &sdhc1;
|
||||||
};
|
};
|
||||||
|
|
||||||
leds {
|
leds {
|
||||||
|
@ -121,6 +123,31 @@
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&sdhc {
|
||||||
|
sdhc1: sdhc@1 {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
pinctrl-0 = <&sdhc0_default>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
power-delay-ms = <100>;
|
||||||
|
max-bus-freq = <52000000>;
|
||||||
|
bus-width = <4>;
|
||||||
|
|
||||||
|
clk-pin = <14>;
|
||||||
|
cmd-pin = <15>;
|
||||||
|
d0-pin = <2>;
|
||||||
|
d1-pin = <4>;
|
||||||
|
d2-pin = <12>;
|
||||||
|
d3-pin = <13>;
|
||||||
|
|
||||||
|
mmc {
|
||||||
|
compatible = "zephyr,sdmmc-disk";
|
||||||
|
disk-name = "SD";
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
&flash0 {
|
&flash0 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
partitions {
|
partitions {
|
||||||
|
|
|
@ -14,6 +14,7 @@ supported:
|
||||||
- display
|
- display
|
||||||
- lora
|
- lora
|
||||||
- nvs
|
- nvs
|
||||||
|
- sdhc
|
||||||
testing:
|
testing:
|
||||||
ignore_tags:
|
ignore_tags:
|
||||||
- net
|
- net
|
||||||
|
|
|
@ -8,3 +8,6 @@ CONFIG_UART_CONSOLE=y
|
||||||
|
|
||||||
CONFIG_GPIO=y
|
CONFIG_GPIO=y
|
||||||
CONFIG_I2C=y
|
CONFIG_I2C=y
|
||||||
|
|
||||||
|
# the following config is required to support chips of revision 1
|
||||||
|
CONFIG_ESP32_USE_UNSUPPORTED_REVISION=y
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue