Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
9be363d
Tasmota changes
Jason2866 Jul 28, 2025
3750754
Merge branch 'espressif:release/v5.4' into release/v5.4
Jason2866 Jul 30, 2025
849ef45
Update version.txt
Jason2866 Jul 30, 2025
b30ea53
Merge branch 'espressif:release/v5.4' into release/v5.4
Jason2866 Aug 4, 2025
153ccdb
Merge branch 'espressif:release/v5.4' into release/v5.4
Jason2866 Aug 5, 2025
e120496
Update version.txt
Jason2866 Aug 5, 2025
d1c3f76
Update gcc 14.2.0+20250730
Jason2866 Aug 6, 2025
65aeb47
list(APPEND link_options "-Wl,--gc-sections")
Jason2866 Aug 7, 2025
62373da
Merge branch 'espressif:release/v5.4' into release/v5.4
Jason2866 Aug 15, 2025
86faebf
Update version.txt
Jason2866 Aug 18, 2025
7510199
Merge branch 'espressif:release/v5.4' into release/v5.4
Jason2866 Aug 19, 2025
a6ab052
Update version.txt
Jason2866 Aug 19, 2025
d53b122
Merge branch 'espressif:release/v5.4' into release/v5.4
Jason2866 Aug 21, 2025
3687c69
Update version.txt
Jason2866 Aug 21, 2025
10acc20
Merge branch 'espressif:release/v5.4' into release/v5.4
Jason2866 Aug 23, 2025
24f0a9b
Update version to 5.4.2.250820
Jason2866 Aug 23, 2025
bc7ca9d
Merge branch 'espressif:release/v5.4' into release/v5.4
Jason2866 Aug 25, 2025
3b99a4d
Bump version from 5.4.2.250820 to 5.4.2.250821
Jason2866 Aug 25, 2025
582c870
Remove non-interactive flag from install commands
Jason2866 Aug 27, 2025
e232d21
Merge branch 'espressif:release/v5.4' into release/v5.4
Jason2866 Aug 27, 2025
f15276e
Update version number to 5.4.2.250825
Jason2866 Aug 27, 2025
98830ab
Merge branch 'espressif:release/v5.4' into release/v5.4
Jason2866 Aug 30, 2025
ce33158
Update version to 5.4.2.250826
Jason2866 Aug 30, 2025
995b641
Merge branch 'espressif:release/v5.4' into release/v5.4
Jason2866 Sep 1, 2025
a25c5c0
Update version number to 5.4.2.250829
Jason2866 Sep 1, 2025
26e66dd
Change zip file creation to tar.xz format
Jason2866 Sep 11, 2025
11b6897
gcc 15.1 support
Jason2866 Sep 12, 2025
001570c
gcc15.1 in tools
Jason2866 Sep 12, 2025
ba9ffe0
Merge branch 'espressif:release/v5.4' into release/v5.4
Jason2866 Sep 18, 2025
cf0b85c
Update version from 5.4.2.250829 to 5.4.2.250915
Jason2866 Sep 18, 2025
0126aaf
Update GDB version to 16.3_20250913
Jason2866 Sep 21, 2025
a3722f8
Update CMakeLists.txt
Jason2866 Sep 21, 2025
1eef4b5
Remove LTO compile and linking option
Jason2866 Sep 21, 2025
c7d6530
Disable RISC-V specific compile option
Jason2866 Sep 21, 2025
55c4352
Merge branch 'espressif:release/v5.4' into release/v5.4
Jason2866 Oct 1, 2025
4d4b4bc
Update version from 5.4.2.250915 to 5.4.2.250928
Jason2866 Oct 1, 2025
bb1b79e
Merge branch 'espressif:release/v5.4' into release/v5.4
Jason2866 Oct 4, 2025
a0ea0e5
Update version from 5.4.2.250928 to 5.4.2.250930
Jason2866 Oct 4, 2025
f29b263
Merge branch 'espressif:release/v5.4' into release/v5.4
Jason2866 Oct 11, 2025
37a7a7d
Update version to 5.4.2.251006
Jason2866 Oct 11, 2025
51c6cb3
Merge branch 'espressif:release/v5.4' into release/v5.4
Jason2866 Oct 11, 2025
bfd7bd4
Update version from 5.4.2.251006 to 5.4.2.251010
Jason2866 Oct 11, 2025
f2ba15c
Merge branch 'espressif:release/v5.4' into release/v5.4
Jason2866 Oct 13, 2025
888f0c6
Bump version from 5.4.2.251010 to 5.4.2.251011
Jason2866 Oct 13, 2025
4ec97f6
Merge branch 'espressif:release/v5.4' into release/v5.4
Jason2866 Oct 18, 2025
9b570fe
Merge branch 'espressif:release/v5.4' into release/v5.4
Jason2866 Oct 24, 2025
6cb2e5f
Update version from 5.4.2.251011 to 5.4.3
Jason2866 Oct 24, 2025
0aa08e9
Update version to 5.4.3.251105
Jason2866 Nov 6, 2025
261e044
Merge branch 'release/v5.4' into m54
Jason2866 Nov 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions .github/workflows/release_zips.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Create zip file with recursive source clone for release
name: Create tar.xz archive with recursive source clone for release

on:
push:
Expand All @@ -7,12 +7,11 @@ on:

jobs:
release_zips:
name: Create release zip file
runs-on: ubuntu-24.04
name: Create release tar.xz archive
runs-on: ubuntu-latest
steps:
- name: Create a recursive clone source zip
uses: espressif/release-zips-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
release_project_name: ESP-IDF
git_extra_args: --shallow-since="1 year ago"
- name: Create a recursive clone source and stripped archive
uses: Jason2866/github-actions/release_zips@tar_xz
env:
RELEASE_PROJECT_NAME: ESP-IDF
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9 changes: 0 additions & 9 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,6 @@
sbom-description = A small and fast ECDH and ECDSA implementation for 8-bit, 32-bit, and 64-bit processors
sbom-hash = 24c60e243580c7868f4334a1ba3123481fe1aa48

[submodule "components/spiffs/spiffs"]
path = components/spiffs/spiffs
url = ../../pellepl/spiffs.git
sbom-version = 0.2-255-g0dbb3f71c5f6
sbom-supplier = Person: Peter Andersson
sbom-url = https://github.com/pellepl/spiffs
sbom-description = Wear-leveled SPI flash file system for embedded devices
sbom-hash = 0dbb3f71c5f6fae3747a9d935372773762baf852

[submodule "components/json/cJSON"]
path = components/json/cJSON
url = ../../DaveGamble/cJSON.git
Expand Down
29 changes: 26 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
cmake_minimum_required(VERSION 3.16)
cmake_minimum_required(VERSION 3.22)
project(esp-idf C CXX ASM)

if(CMAKE_CURRENT_LIST_DIR STREQUAL CMAKE_SOURCE_DIR)
message(FATAL_ERROR "Current directory '${CMAKE_CURRENT_LIST_DIR}' is not buildable. "
Expand Down Expand Up @@ -96,8 +97,6 @@ if(CMAKE_C_COMPILER_ID MATCHES "Clang")
list(APPEND compile_options "-Wno-char-subscripts")
# Clang seems to notice format string issues which GCC doesn't.
list(APPEND compile_options "-Wno-format-security")
# Logic bug in essl component
list(APPEND compile_options "-Wno-tautological-overlap-compare")
# Some pointer checks in mDNS component check addresses which can't be NULL
list(APPEND compile_options "-Wno-tautological-pointer-compare")
# Similar to the above, in tcp_transport
Expand Down Expand Up @@ -160,6 +159,14 @@ if(CONFIG_COMPILER_DUMP_RTL_FILES)
list(APPEND compile_options "-fdump-rtl-expand")
endif()

if(CMAKE_C_COMPILER_ID MATCHES "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER 15.0)
list(APPEND c_compile_options "-fzero-init-padding-bits=all" "-fno-malloc-dce")
endif()

# if(CMAKE_C_COMPILER_ID MATCHES "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER 15.0 AND CONFIG_IDF_TARGET_ARCH_RISCV)
# list(APPEND compile_options "-mespv-spec=2p1") # Use xespv2p1 instruction set
# endif()

__generate_prefix_map(prefix_map_compile_options)
list(APPEND compile_options ${prefix_map_compile_options})

Expand All @@ -179,6 +186,15 @@ if(CONFIG_COMPILER_DISABLE_GCC14_WARNINGS)
list(APPEND compile_options "-Wno-calloc-transposed-args")
endif()

if(CONFIG_COMPILER_DISABLE_GCC15_WARNINGS)
list(APPEND c_compile_options "-Wno-unterminated-string-initialization")
list(APPEND c_compile_options "-Wno-header-guard")
list(APPEND cxx_compile_options "-Wno-self-move")
list(APPEND cxx_compile_options "-Wno-template-body")
list(APPEND cxx_compile_options "-Wno-dangling-reference")
list(APPEND cxx_compile_options "-Wno-defaulted-function-deleted")
endif()

if(CONFIG_COMPILER_DISABLE_DEFAULT_ERRORS)
if(NOT CMAKE_C_COMPILER_ID MATCHES "Clang")
idf_build_replace_option_from_property(COMPILE_OPTIONS "-Werror" "-Werror=all")
Expand All @@ -198,6 +214,13 @@ if(CONFIG_ESP_SYSTEM_USE_EH_FRAME)
list(APPEND link_options "-Wl,--eh-frame-hdr")
endif()

if(CONFIG_ESP_SYSTEM_USE_FRAME_POINTER)
list(APPEND compile_options "-fno-omit-frame-pointer")
if(CMAKE_C_COMPILER_ID MATCHES "GNU")
list(APPEND compile_options "-mno-omit-leaf-frame-pointer")
endif()
endif()

list(APPEND link_options "-fno-lto")

if(CONFIG_IDF_TARGET_LINUX AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
Expand Down
19 changes: 10 additions & 9 deletions components/esp_driver_dac/dac_continuous.c
Original file line number Diff line number Diff line change
Expand Up @@ -555,16 +555,17 @@ static esp_err_t s_dac_wait_to_load_dma_data(dac_continuous_handle_t handle, uin
DAC_STAILQ_REMOVE(&handle->head, desc, lldesc_s, qe);
}

static bool split_flag = false;
// TASMOTA: remove split because it does some harm and I'm not sure why it was there in the first place. No such code in 4.x
// static bool split_flag = false;
uint8_t *dma_buf = (uint8_t *)desc->buf;
if (buf_size * DAC_16BIT_ALIGN_COEFF < 2 * handle->cfg.buf_size) {
if (!split_flag) {
buf_size >>= 1;
split_flag = true;
} else {
split_flag = false;
}
}
// if (buf_size * DAC_16BIT_ALIGN_COEFF < 2 * handle->cfg.buf_size) {
// if (!split_flag) {
// buf_size >>= 1;
// split_flag = true;
// } else {
// split_flag = false;
// }
// }
size_t load_bytes = s_dac_load_data_into_buf(handle, dma_buf, handle->cfg.buf_size, buf, buf_size);
lldesc_config(desc, LLDESC_HW_OWNED, 1, 0, load_bytes);
desc->size = load_bytes;
Expand Down
3 changes: 2 additions & 1 deletion components/esp_eth/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ if(CONFIG_ETH_ENABLED)
"src/phy/esp_eth_phy_ip101.c"
"src/phy/esp_eth_phy_ksz80xx.c"
"src/phy/esp_eth_phy_lan87xx.c"
"src/phy/esp_eth_phy_rtl8201.c")
"src/phy/esp_eth_phy_rtl8201.c"
"src/phy/esp_eth_phy_jl1101.c")
endif()

if(CONFIG_ETH_SPI_ETHERNET_DM9051)
Expand Down
11 changes: 11 additions & 0 deletions components/esp_eth/include/esp_eth_phy.h
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,17 @@ esp_eth_phy_t *esp_eth_phy_new_dp83848(const eth_phy_config_t *config);
*/
esp_eth_phy_t *esp_eth_phy_new_ksz80xx(const eth_phy_config_t *config);

/**
* @brief Create a PHY instance of JL1101
*
* @param[in] config: configuration of PHY
*
* @return
* - instance: create PHY instance successfully
* - NULL: create PHY instance failed because some error occurred
*/
esp_eth_phy_t *esp_eth_phy_new_jl1101(const eth_phy_config_t *config);

#if CONFIG_ETH_SPI_ETHERNET_DM9051
/**
* @brief Create a PHY instance of DM9051
Expand Down
186 changes: 186 additions & 0 deletions components/esp_eth/src/phy/esp_eth_phy_jl1101.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
/*
* SPDX-FileCopyrightText: 2019-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/

#include <string.h>
#include <stdlib.h>
#include <sys/cdefs.h>
#include "esp_log.h"
#include "esp_check.h"
#include "esp_eth_phy_802_3.h"

static const char *TAG = "jl1101";

/***************Vendor Specific Register***************/

/**
* @brief PSMR(Power Saving Mode Register)
*
*/
typedef union {
struct {
uint16_t reserved : 15; /* Reserved */
uint16_t en_pwr_save : 1; /* Enable power saving mode */
};
uint16_t val;
} psmr_reg_t;

/**
* @brief PSR(Page Select Register)
*
*/
typedef union {
struct {
uint16_t page_select : 8; /* Select register page, default is 0 */
uint16_t reserved : 8; /* Reserved */
};
uint16_t val;
} psr_reg_t;
#define ETH_PHY_PSR_REG_ADDR (0x1F)

typedef struct {
phy_802_3_t phy_802_3;
} phy_jl1101_t;

static esp_err_t jl1101_page_select(phy_jl1101_t *jl1101, uint32_t page)
{
esp_err_t ret = ESP_OK;
esp_eth_mediator_t *eth = jl1101->phy_802_3.eth;
psr_reg_t psr = {
.page_select = page
};
ESP_GOTO_ON_ERROR(eth->phy_reg_write(eth, jl1101->phy_802_3.addr, ETH_PHY_PSR_REG_ADDR, psr.val), err, TAG, "write PSR failed");
return ESP_OK;
err:
return ret;
}

static esp_err_t jl1101_update_link_duplex_speed(phy_jl1101_t *jl1101)
{
esp_err_t ret = ESP_OK;
esp_eth_mediator_t *eth = jl1101->phy_802_3.eth;
uint32_t addr = jl1101->phy_802_3.addr;
eth_speed_t speed = ETH_SPEED_10M;
eth_duplex_t duplex = ETH_DUPLEX_HALF;
bmcr_reg_t bmcr;
bmsr_reg_t bmsr;
uint32_t peer_pause_ability = false;
anlpar_reg_t anlpar;
ESP_GOTO_ON_ERROR(jl1101_page_select(jl1101, 0), err, TAG, "select page 0 failed");
ESP_GOTO_ON_ERROR(eth->phy_reg_read(eth, addr, ETH_PHY_BMSR_REG_ADDR, &(bmsr.val)), err, TAG, "read BMSR failed");
ESP_GOTO_ON_ERROR(eth->phy_reg_read(eth, addr, ETH_PHY_ANLPAR_REG_ADDR, &(anlpar.val)), err, TAG, "read ANLPAR failed");
eth_link_t link = bmsr.link_status ? ETH_LINK_UP : ETH_LINK_DOWN;
/* check if link status changed */
if (jl1101->phy_802_3.link_status != link) {
/* when link up, read negotiation result */
if (link == ETH_LINK_UP) {
ESP_GOTO_ON_ERROR(eth->phy_reg_read(eth, addr, ETH_PHY_BMCR_REG_ADDR, &(bmcr.val)), err, TAG, "read BMCR failed");
if (bmcr.speed_select) {
speed = ETH_SPEED_100M;
} else {
speed = ETH_SPEED_10M;
}
if (bmcr.duplex_mode) {
duplex = ETH_DUPLEX_FULL;
} else {
duplex = ETH_DUPLEX_HALF;
}
ESP_GOTO_ON_ERROR(eth->on_state_changed(eth, ETH_STATE_SPEED, (void *)speed), err, TAG, "change speed failed");
ESP_GOTO_ON_ERROR(eth->on_state_changed(eth, ETH_STATE_DUPLEX, (void *)duplex), err, TAG, "change duplex failed");
/* if we're in duplex mode, and peer has the flow control ability */
if (duplex == ETH_DUPLEX_FULL && anlpar.symmetric_pause) {
peer_pause_ability = 1;
} else {
peer_pause_ability = 0;
}
ESP_GOTO_ON_ERROR(eth->on_state_changed(eth, ETH_STATE_PAUSE, (void *)peer_pause_ability), err, TAG, "change pause ability failed");
}
ESP_GOTO_ON_ERROR(eth->on_state_changed(eth, ETH_STATE_LINK, (void *)link), err, TAG, "change link failed");
jl1101->phy_802_3.link_status = link;
}
return ESP_OK;
err:
return ret;
}

static esp_err_t jl1101_get_link(esp_eth_phy_t *phy)
{
esp_err_t ret = ESP_OK;
phy_jl1101_t *jl1101 = __containerof(esp_eth_phy_into_phy_802_3(phy), phy_jl1101_t, phy_802_3);
/* Updata information about link, speed, duplex */
ESP_GOTO_ON_ERROR(jl1101_update_link_duplex_speed(jl1101), err, TAG, "update link duplex speed failed");
return ESP_OK;
err:
return ret;
}

static esp_err_t jl1101_autonego_ctrl(esp_eth_phy_t *phy, eth_phy_autoneg_cmd_t cmd, bool *autonego_en_stat)
{
esp_err_t ret = ESP_OK;
phy_802_3_t *phy_802_3 = esp_eth_phy_into_phy_802_3(phy);
esp_eth_mediator_t *eth = phy_802_3->eth;
if (cmd == ESP_ETH_PHY_AUTONEGO_EN) {
bmcr_reg_t bmcr;
ESP_GOTO_ON_ERROR(eth->phy_reg_read(eth, phy_802_3->addr, ETH_PHY_BMCR_REG_ADDR, &(bmcr.val)), err, TAG, "read BMCR failed");
ESP_GOTO_ON_FALSE(bmcr.en_loopback == 0, ESP_ERR_INVALID_STATE, err, TAG, "Autonegotiation can't be enabled while in loopback operation");
}
return esp_eth_phy_802_3_autonego_ctrl(phy_802_3, cmd, autonego_en_stat);
err:
return ret;
}

static esp_err_t jl1101_loopback(esp_eth_phy_t *phy, bool enable)
{
esp_err_t ret = ESP_OK;
phy_802_3_t *phy_802_3 = esp_eth_phy_into_phy_802_3(phy);
bool auto_nego_en;
ESP_GOTO_ON_ERROR(jl1101_autonego_ctrl(phy, ESP_ETH_PHY_AUTONEGO_G_STAT, &auto_nego_en), err, TAG, "get status of autonegotiation failed");
ESP_GOTO_ON_FALSE(!(auto_nego_en && enable), ESP_ERR_INVALID_STATE, err, TAG, "Unable to set loopback while autonegotiation is enabled. Disable it to use loopback");
return esp_eth_phy_802_3_loopback(phy_802_3, enable);
err:
return ret;
}

static esp_err_t jl1101_init(esp_eth_phy_t *phy)
{
esp_err_t ret = ESP_OK;
phy_802_3_t *phy_802_3 = esp_eth_phy_into_phy_802_3(phy);

/* Basic PHY init */
ESP_GOTO_ON_ERROR(esp_eth_phy_802_3_basic_phy_init(phy_802_3), err, TAG, "failed to init PHY");

/* Check PHY ID */
uint32_t oui;
uint8_t model;
ESP_GOTO_ON_ERROR(esp_eth_phy_802_3_read_oui(phy_802_3, &oui), err, TAG, "read OUI failed");
ESP_GOTO_ON_ERROR(esp_eth_phy_802_3_read_manufac_info(phy_802_3, &model, NULL), err, TAG, "read manufacturer's info failed");
ESP_GOTO_ON_FALSE(oui == 0x24DF10 && model == 0x2, ESP_FAIL, err, TAG, "wrong chip ID");

return ESP_OK;
err:
return ret;
}

esp_eth_phy_t *esp_eth_phy_new_jl1101(const eth_phy_config_t *config)
{
esp_eth_phy_t *ret = NULL;
phy_jl1101_t *jl1101 = calloc(1, sizeof(phy_jl1101_t));
ESP_GOTO_ON_FALSE(jl1101, NULL, err, TAG, "calloc jl1101 failed");
ESP_GOTO_ON_FALSE(esp_eth_phy_802_3_obj_config_init(&jl1101->phy_802_3, config) == ESP_OK,
NULL, err, TAG, "configuration initialization of PHY 802.3 failed");

// redefine functions which need to be customized for sake of jl1101
jl1101->phy_802_3.parent.init = jl1101_init;
jl1101->phy_802_3.parent.get_link = jl1101_get_link;
jl1101->phy_802_3.parent.autonego_ctrl = jl1101_autonego_ctrl;
jl1101->phy_802_3.parent.loopback = jl1101_loopback;

return &jl1101->phy_802_3.parent;
err:
if (jl1101 != NULL) {
free(jl1101);
}
return ret;
}
2 changes: 2 additions & 0 deletions components/esp_hw_support/mac_addr.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,8 @@ static esp_err_t get_efuse_factory_mac(uint8_t *mac)
uint32_t mac_low = ((uint32_t)mac[2] << 24) | ((uint32_t)mac[3] << 16) | ((uint32_t)mac[4] << 8) | mac[5];
if (((mac_high & 0xFFFF) == 0x18fe) && (mac_low >= 0x346a85c7) && (mac_low <= 0x346a85f8)) {
return ESP_OK;
} else if (esp_efuse_get_pkg_ver() == 3) {
return ESP_OK; // override for Xiaomi SOC's and maybe others too
} else {
ESP_LOGE(TAG, "Base MAC address from BLK0 of EFUSE CRC error, efuse_crc = 0x%02x; calc_crc = 0x%02x", efuse_crc, calc_crc);
#ifdef CONFIG_ESP_MAC_IGNORE_MAC_CRC_ERROR
Expand Down
2 changes: 1 addition & 1 deletion components/esp_psram/esp32/esp_psram_impl_quad.c
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,7 @@ esp_err_t IRAM_ATTR esp_psram_impl_enable(void) //psram init
psram_io.psram_cs_io = D0WDR2_V3_PSRAM_CS_IO;
} else {
ESP_EARLY_LOGE(TAG, "Not a valid or known package id: %" PRIu32, pkg_ver);
abort();
return ESP_FAIL;
}
s_psram_cs_io = psram_io.psram_cs_io;

Expand Down
2 changes: 1 addition & 1 deletion components/soc/esp32c2/include/soc/soc.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#define UART_FIFO_AHB_REG(i) (REG_UART_AHB_BASE(i) + 0x0)
#define REG_TIMG_BASE(i) (DR_REG_TIMERGROUP0_BASE + (i)*0x1000)
#define REG_SPI_MEM_BASE(i) (DR_REG_SPI0_BASE - (i) * 0x1000)
#define REG_SPI_BASE(i) (((i)==2) ? (DR_REG_SPI2_BASE) : (0)) // only one GPSPI
#define REG_SPI_BASE(i) (((i)==2) ? (DR_REG_SPI2_BASE) : (DR_REG_SPI0_BASE - ((i) * 0x1000))) // only one GPSPI
#define REG_I2C_BASE(i) (DR_REG_I2C_EXT_BASE + (i) * 0x14000 )

//Registers Operation {{
Expand Down
2 changes: 1 addition & 1 deletion components/soc/esp32c3/include/soc/soc.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#define REG_I2S_BASE(i) (DR_REG_I2S_BASE) // only one I2S on C3
#define REG_TIMG_BASE(i) (DR_REG_TIMERGROUP0_BASE + (i)*0x1000)
#define REG_SPI_MEM_BASE(i) (DR_REG_SPI0_BASE - (i) * 0x1000)
#define REG_SPI_BASE(i) (((i)==2) ? (DR_REG_SPI2_BASE) : (0)) // only one GPSPI
#define REG_SPI_BASE(i) (((i)==2) ? (DR_REG_SPI2_BASE) : (DR_REG_SPI0_BASE - ((i) * 0x1000))) // only one GPSPI
#define REG_I2C_BASE(i) (DR_REG_I2C_EXT_BASE + (i) * 0x14000 )

//Registers Operation {{
Expand Down
2 changes: 1 addition & 1 deletion components/soc/esp32c6/include/soc/soc.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#define REG_I2S_BASE(i) (DR_REG_I2S_BASE) // only one I2S on C6
#define REG_TIMG_BASE(i) (DR_REG_TIMERGROUP0_BASE + (i) * 0x1000) // TIMERG0 and TIMERG1
#define REG_SPI_MEM_BASE(i) (DR_REG_SPI0_BASE + (i) * 0x1000) // SPIMEM0 and SPIMEM1
#define REG_SPI_BASE(i) (((i)==2) ? (DR_REG_SPI2_BASE) : (0)) // only one GPSPI on C6
#define REG_SPI_BASE(i) (((i)==2) ? (DR_REG_SPI2_BASE) : (DR_REG_SPI0_BASE - ((i) * 0x1000))) // only one GPSPI on C6
#define REG_I2C_BASE(i) (DR_REG_I2C_EXT_BASE) // only one I2C on C6
#define REG_MCPWM_BASE(i) (DR_REG_MCPWM_BASE) // only one MCPWM on C6
#define REG_TWAI_BASE(i) (DR_REG_TWAI0_BASE + (i) * 0x2000) // TWAI0 and TWAI1
Expand Down
2 changes: 1 addition & 1 deletion components/soc/esp32h2/include/soc/soc.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#define REG_I2S_BASE(i) (DR_REG_I2S_BASE) // only one I2S on H2
#define REG_TIMG_BASE(i) (DR_REG_TIMERGROUP0_BASE + (i)*0x1000)
#define REG_SPI_MEM_BASE(i) (DR_REG_SPI0_BASE + (i) * 0x1000)
#define REG_SPI_BASE(i) (((i)==2) ? (DR_REG_SPI2_BASE) : (0)) // only one GPSPI
#define REG_SPI_BASE(i) (DR_REG_SPI2_BASE + (i - 2) * 0x1000) // only one GPSPI
#define REG_I2C_BASE(i) (DR_REG_I2C_EXT0_BASE + (i) * 0x1000)

//Registers Operation {{
Expand Down
Loading
Loading