In this project I used both the capabilities of the Arduino and ESP-IDF with FreeRTOS.
- Platform: WEMOS LOLIN32
- Framework: Arduino
- Upload Method:
- esptool (Default)
- jlink
- esp-prog (Based on FT2232H or FT232H)
- Debug Method:
- esp-prog (Based on FT2232H or FT232H)
Set CONFIG_FREERTOS_UNICORE=y
in sdkconfig.lolin32
to use only core 0 for demo purposes.
Add a small delay (10ms) to infinite loops to prevent Task watchdog got triggered
warning.
Or you can set priority of all tasks to 0 (Idle).
Debugging feature of PlatformIO for Esp32 is buggy. But if you set the framework to Arduino, you can have a bit better debugging experience than ESP-IDF framework.
The hardware used for debugging ESP32 is an FT232H USB-JTAG adapter:
Connect ESP32 to FT232H USB-JTAG adapter according to the following table:
ESP32 | FT232H |
---|---|
GPIO12 | AD1 (TDI) |
GPIO13 | AD0 (TCK) |
GPIO14 | AD3 (TMS) |
GPIO15 | AD2 (TDO) |
GND | GND |
For more information, read the following articles:
Just start your program from extern "C" void app_main(void)
instead of void setup()
and void loop()
.
pio run -t menuconfig
Note: Use `J` and `K` instead of up and down arrow keys to move between items in `menuconfig`
- WEMOS LOLIN32
- ESP32 Hardware Serial2 Example
- GPIO Matrix and Pin Mux
- ESP32 Digital Inputs & Digital Outputs โ Arduino Tutorial
- Introduction to RTOS (YouTube)
- Introduction to RTOS (GitHub)
- Watchdogs
- Universal Asynchronous Receiver/Transmitter (UART)
- UART Echo Example
- Hello World with ESP32 Explained
- ESP-IDF for PlatformIO
- ESP32 UART Communication using ESP-IDF
- uxTaskGetStackHighWaterMark
- Stop boot rom logs , panic handler logs on UART 0 on Esp-Wroom-32
- Why is volatile needed in C?
- ESP32 as I2C Master Tutorial (ESP-IDF)
- How To Track Orientation with Arduino and ADXL345 Accelerometer
- esp32-i2c-adxl345
- ESP-IDF components
- Measuring analog inputs with ESP32 ADC (ESP-IDF)
- onewire - Bit-banging one wire driver
- onewire
- ds18x20 - Driver for DS18B20/DS18S20
- ds18x20
- matjazv / ds18b20
- ESP32 SPI Master (ESP-IDF)
- ESP32 SPI Master Slave Communication with ESP-IDF
- SPI master half duplex EEPROM example
- SPI Flash API