Unverified Commit 683dbf3b authored by Pedro Minatel's avatar Pedro Minatel Committed by GitHub

Added ESP32-WROOM-DA module to boards.txt (#6361)

Added dual antenna configuration based on the module selection
Added warning to the example on how to use the DA
parent c2e5957f
......@@ -487,6 +487,155 @@ esp32.menu.DebugLevel.verbose.build.code_debug=5
##############################################################
esp32da.name=ESP32-WROOM-DA Module
esp32da.upload.tool=esptool_py
esp32da.upload.maximum_size=1310720
esp32da.upload.maximum_data_size=327680
esp32da.upload.flags=
esp32da.upload.extra_flags=
esp32da.serial.disableDTR=true
esp32da.serial.disableRTS=true
esp32da.build.tarch=xtensa
esp32da.build.bootloader_addr=0x1000
esp32da.build.target=esp32
esp32da.build.mcu=esp32
esp32da.build.core=esp32
esp32da.build.variant=esp32da
esp32da.build.board=ESP32_WROOM_DA
esp32da.build.f_cpu=240000000L
esp32da.build.flash_size=4MB
esp32da.build.flash_freq=40m
esp32da.build.flash_mode=dio
esp32da.build.boot=dio
esp32da.build.partitions=default
esp32da.build.defines=
esp32da.build.loop_core=
esp32da.build.event_core=
esp32da.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
esp32da.menu.PartitionScheme.default.build.partitions=default
esp32da.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS)
esp32da.menu.PartitionScheme.defaultffat.build.partitions=default_ffat
esp32da.menu.PartitionScheme.default_8MB=8M Flash (3MB APP/1.5MB FAT)
esp32da.menu.PartitionScheme.default_8MB.build.partitions=default_8MB
esp32da.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336
esp32da.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS)
esp32da.menu.PartitionScheme.minimal.build.partitions=minimal
esp32da.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS)
esp32da.menu.PartitionScheme.no_ota.build.partitions=no_ota
esp32da.menu.PartitionScheme.no_ota.upload.maximum_size=2097152
esp32da.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS)
esp32da.menu.PartitionScheme.noota_3g.build.partitions=noota_3g
esp32da.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576
esp32da.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS)
esp32da.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat
esp32da.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152
esp32da.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS)
esp32da.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat
esp32da.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576
esp32da.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS)
esp32da.menu.PartitionScheme.huge_app.build.partitions=huge_app
esp32da.menu.PartitionScheme.huge_app.upload.maximum_size=3145728
esp32da.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)
esp32da.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
esp32da.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080
esp32da.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FAT)
esp32da.menu.PartitionScheme.fatflash.build.partitions=ffat
esp32da.menu.PartitionScheme.fatflash.upload.maximum_size=2097152
esp32da.menu.PartitionScheme.app3M_fat9M_16MB=16M Flash (3MB APP/9MB FATFS)
esp32da.menu.PartitionScheme.app3M_fat9M_16MB.build.partitions=app3M_fat9M_16MB
esp32da.menu.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728
esp32da.menu.PartitionScheme.rainmaker=RainMaker
esp32da.menu.PartitionScheme.rainmaker.build.partitions=rainmaker
esp32da.menu.PartitionScheme.rainmaker.upload.maximum_size=3145728
esp32da.menu.CPUFreq.240=240MHz (WiFi/BT)
esp32da.menu.CPUFreq.240.build.f_cpu=240000000L
esp32da.menu.CPUFreq.160=160MHz (WiFi/BT)
esp32da.menu.CPUFreq.160.build.f_cpu=160000000L
esp32da.menu.CPUFreq.80=80MHz (WiFi/BT)
esp32da.menu.CPUFreq.80.build.f_cpu=80000000L
esp32da.menu.CPUFreq.40=40MHz (40MHz XTAL)
esp32da.menu.CPUFreq.40.build.f_cpu=40000000L
esp32da.menu.CPUFreq.26=26MHz (26MHz XTAL)
esp32da.menu.CPUFreq.26.build.f_cpu=26000000L
esp32da.menu.CPUFreq.20=20MHz (40MHz XTAL)
esp32da.menu.CPUFreq.20.build.f_cpu=20000000L
esp32da.menu.CPUFreq.13=13MHz (26MHz XTAL)
esp32da.menu.CPUFreq.13.build.f_cpu=13000000L
esp32da.menu.CPUFreq.10=10MHz (40MHz XTAL)
esp32da.menu.CPUFreq.10.build.f_cpu=10000000L
esp32da.menu.FlashMode.qio=QIO
esp32da.menu.FlashMode.qio.build.flash_mode=dio
esp32da.menu.FlashMode.qio.build.boot=qio
esp32da.menu.FlashMode.dio=DIO
esp32da.menu.FlashMode.dio.build.flash_mode=dio
esp32da.menu.FlashMode.dio.build.boot=dio
esp32da.menu.FlashMode.qout=QOUT
esp32da.menu.FlashMode.qout.build.flash_mode=dout
esp32da.menu.FlashMode.qout.build.boot=qout
esp32da.menu.FlashMode.dout=DOUT
esp32da.menu.FlashMode.dout.build.flash_mode=dout
esp32da.menu.FlashMode.dout.build.boot=dout
esp32da.menu.FlashFreq.80=80MHz
esp32da.menu.FlashFreq.80.build.flash_freq=80m
esp32da.menu.FlashFreq.40=40MHz
esp32da.menu.FlashFreq.40.build.flash_freq=40m
esp32da.menu.FlashSize.4M=4MB (32Mb)
esp32da.menu.FlashSize.4M.build.flash_size=4MB
esp32da.menu.FlashSize.8M=8MB (64Mb)
esp32da.menu.FlashSize.8M.build.flash_size=8MB
esp32da.menu.FlashSize.8M.build.partitions=default_8MB
esp32da.menu.FlashSize.16M=16MB (128Mb)
esp32da.menu.FlashSize.16M.build.flash_size=16MB
esp32da.menu.UploadSpeed.921600=921600
esp32da.menu.UploadSpeed.921600.upload.speed=921600
esp32da.menu.UploadSpeed.115200=115200
esp32da.menu.UploadSpeed.115200.upload.speed=115200
esp32da.menu.UploadSpeed.256000.windows=256000
esp32da.menu.UploadSpeed.256000.upload.speed=256000
esp32da.menu.UploadSpeed.230400.windows.upload.speed=256000
esp32da.menu.UploadSpeed.230400=230400
esp32da.menu.UploadSpeed.230400.upload.speed=230400
esp32da.menu.UploadSpeed.460800.linux=460800
esp32da.menu.UploadSpeed.460800.macosx=460800
esp32da.menu.UploadSpeed.460800.upload.speed=460800
esp32da.menu.UploadSpeed.512000.windows=512000
esp32da.menu.UploadSpeed.512000.upload.speed=512000
esp32da.menu.LoopCore.1=Core 1
esp32da.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1
esp32da.menu.LoopCore.0=Core 0
esp32da.menu.LoopCore.0.build.loop_core=-DARDUINO_RUNNING_CORE=0
esp32da.menu.EventsCore.1=Core 1
esp32da.menu.EventsCore.1.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1
esp32da.menu.EventsCore.0=Core 0
esp32da.menu.EventsCore.0.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=0
esp32da.menu.DebugLevel.none=None
esp32da.menu.DebugLevel.none.build.code_debug=0
esp32da.menu.DebugLevel.error=Error
esp32da.menu.DebugLevel.error.build.code_debug=1
esp32da.menu.DebugLevel.warn=Warn
esp32da.menu.DebugLevel.warn.build.code_debug=2
esp32da.menu.DebugLevel.info=Info
esp32da.menu.DebugLevel.info.build.code_debug=3
esp32da.menu.DebugLevel.debug=Debug
esp32da.menu.DebugLevel.debug.build.code_debug=4
esp32da.menu.DebugLevel.verbose=Verbose
esp32da.menu.DebugLevel.verbose.build.code_debug=5
##############################################################
esp32wrover.name=ESP32 Wrover Module
esp32wrover.upload.tool=esptool_py
......
......@@ -24,7 +24,12 @@ void setup()
// Set WiFi to station mode and disconnect from an AP if it was previously connected
WiFi.mode(WIFI_STA);
// Set WiFi dual antenna configuration by passing the GPIO and antenna mode for RX ant TX
/* Attention: This is the manual prodecure for the dual antenna configuration.
* If you choose the ESP32-WROOM-DA module from the Tools -> Board, this configuration
* is not necessary!
*
* Set WiFi dual antenna configuration by passing the GPIO and antenna mode for RX ant TX
*/
err = WiFi.setDualAntennaConfig(GPIO_ANT1, GPIO_ANT1, WIFI_RX_ANT_AUTO, WIFI_TX_ANT_AUTO);
/* For more details on how to use this feature, see our docs:
......
......@@ -1061,6 +1061,14 @@ bool WiFiGenericClass::mode(wifi_mode_t m)
if(!espWiFiStart()){
return false;
}
#ifdef BOARD_HAS_DUAL_ANTENNA
if(!setDualAntennaConfig(ANT1, ANT2, WIFI_RX_ANT_AUTO, WIFI_TX_ANT_AUTO)){
log_e("Dual Antenna Config failed!");
return false;
}
#endif
return true;
}
......
......@@ -186,7 +186,7 @@ class WiFiGenericClass
bool initiateFTM(uint8_t frm_count=16, uint16_t burst_period=2, uint8_t channel=1, const uint8_t * mac=NULL);
bool setDualAntennaConfig(uint8_t gpio_ant1, uint8_t gpio_ant2, wifi_rx_ant_t rx_mode, wifi_tx_ant_t tx_mode);
static bool setDualAntennaConfig(uint8_t gpio_ant1, uint8_t gpio_ant2, wifi_rx_ant_t rx_mode, wifi_tx_ant_t tx_mode);
static const char * getHostname();
static bool setHostname(const char * hostname);
......
#ifndef Pins_Arduino_h
#define Pins_Arduino_h
#include <stdint.h>
#define EXTERNAL_NUM_INTERRUPTS 16
#define NUM_DIGITAL_PINS 40
#define NUM_ANALOG_INPUTS 16
#define analogInputToDigitalPin(p) (((p)<20)?(analogChannelToDigitalPin(p)):-1)
#define digitalPinToInterrupt(p) (((p)<40)?(p):-1)
#define digitalPinHasPWM(p) (p < 34)
static const uint8_t TX = 1;
static const uint8_t RX = 3;
static const uint8_t SDA = 21;
static const uint8_t SCL = 22;
static const uint8_t SS = 5;
static const uint8_t MOSI = 23;
static const uint8_t MISO = 19;
static const uint8_t SCK = 18;
static const uint8_t A0 = 36;
static const uint8_t A3 = 39;
static const uint8_t A4 = 32;
static const uint8_t A5 = 33;
static const uint8_t A6 = 34;
static const uint8_t A7 = 35;
static const uint8_t A10 = 4;
static const uint8_t A11 = 0;
static const uint8_t A12 = 2;
static const uint8_t A13 = 15;
static const uint8_t A14 = 13;
static const uint8_t A15 = 12;
static const uint8_t A16 = 14;
static const uint8_t A17 = 27;
static const uint8_t A18 = 25;
static const uint8_t A19 = 26;
static const uint8_t T0 = 4;
static const uint8_t T1 = 0;
static const uint8_t T2 = 2;
static const uint8_t T3 = 15;
static const uint8_t T4 = 13;
static const uint8_t T5 = 12;
static const uint8_t T6 = 14;
static const uint8_t T7 = 27;
static const uint8_t T8 = 33;
static const uint8_t T9 = 32;
static const uint8_t DAC1 = 25;
static const uint8_t DAC2 = 26;
#define BOARD_HAS_DUAL_ANTENNA
static const uint8_t ANT1 = 2;
static const uint8_t ANT2 = 25;
#endif /* Pins_Arduino_h */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment