Skip to content

Commit

Permalink
Merge branch 'espressif:release/v5.2' into release/v5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason2866 authored Mar 31, 2024
2 parents f45c55c + fcb76f0 commit 0b1ba51
Show file tree
Hide file tree
Showing 9 changed files with 256 additions and 104 deletions.
19 changes: 14 additions & 5 deletions components/esp_hw_support/esp_hmac.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand Down Expand Up @@ -187,7 +187,9 @@ esp_err_t esp_hmac_jtag_enable(hmac_key_id_t key_id, const uint8_t *token)

ESP_LOGD(TAG, "HMAC computation in downstream mode is completed.");

ets_hmac_disable();
HMAC_RCC_ATOMIC() {
hmac_ll_enable_bus_clock(false);
}

esp_crypto_hmac_lock_release();

Expand All @@ -197,9 +199,17 @@ esp_err_t esp_hmac_jtag_enable(hmac_key_id_t key_id, const uint8_t *token)
esp_err_t esp_hmac_jtag_disable()
{
esp_crypto_hmac_lock_acquire();
ets_hmac_enable();

HMAC_RCC_ATOMIC() {
hmac_ll_enable_bus_clock(true);
}

REG_WRITE(HMAC_SET_INVALIDATE_JTAG_REG, 1);
ets_hmac_disable();

HMAC_RCC_ATOMIC() {
hmac_ll_enable_bus_clock(false);
}

esp_crypto_hmac_lock_release();

ESP_LOGD(TAG, "Invalidate JTAG result register. JTAG disabled.");
Expand Down Expand Up @@ -234,7 +244,6 @@ esp_err_t esp_hmac_calculate(hmac_key_id_t key_id,
} else {
return ESP_OK;
}

}

esp_err_t esp_hmac_jtag_enable(hmac_key_id_t key_id, const uint8_t *token)
Expand Down
4 changes: 4 additions & 0 deletions components/esp_mm/esp_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ esp_err_t esp_cache_msync(void *addr, size_t size, int flags)
if (flags & ESP_CACHE_MSYNC_FLAG_DIR_M2C) {
ESP_EARLY_LOGV(TAG, "M2C DIR");

if (flags & ESP_CACHE_MSYNC_FLAG_UNALIGNED) {
ESP_RETURN_ON_FALSE_ISR(false, ESP_ERR_INVALID_ARG, TAG, "M2C direction doesn't allow ESP_CACHE_MSYNC_FLAG_UNALIGNED");
}

esp_os_enter_critical_safe(&s_spinlock);
//Add preload feature / flag here, IDF-7800
valid = cache_hal_invalidate_addr(vaddr, size);
Expand Down
68 changes: 46 additions & 22 deletions components/esp_rom/esp32p4/ld/esp32p4lp.rom.ld
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/*
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/* ROM function interface esp32p4lp.rom.ld for esp32p4lp
*
*
* Generated from ./target/esp32p4lp/interface-esp32p4lp.yml md5sum 0751c805e21bd23f11b74dcc1f7e8007
* Generated from ./target/esp32p4lp/interface-esp32p4lp.yml md5sum f827caf806e9f4faec384ffbde44b380
*
* Compatible with ROM where ECO version equal or greater to 0.
*
Expand All @@ -20,37 +20,61 @@
/* Functions */
rtc_get_reset_reason = 0x50100098;
rtc_get_wakeup_cause = 0x5010009c;
ets_printf = 0x501000a0;
ets_install_putc1 = 0x501000a4;
ets_install_uart_printf = 0x501000a8;
ets_delay_us = 0x501000ac;
uart_tx_one_char = 0x501000b0;
uart_tx_flush = 0x501000b4;
uart_tx_wait_idle = 0x501000b8;
uartAttach = 0x501000bc;
Uart_Init = 0x501000c0;
GetUartDevice = 0x501000c4;
pmu_enable_unhold_pads = 0x501000a0;
ets_printf = 0x501000a4;
ets_install_putc1 = 0x501000a8;
ets_install_uart_printf = 0x501000ac;
ets_delay_us = 0x501000b0;
uart_tx_one_char = 0x501000b4;
uart_tx_flush = 0x501000b8;
uart_tx_wait_idle = 0x501000bc;
uartAttach = 0x501000c0;
Uart_Init = 0x501000c4;
GetUartDevice = 0x501000c8;


/***************************************
Group gpio
***************************************/

/* Functions */
gpio_set_output_level = 0x501000cc;
gpio_get_input_level = 0x501000d0;
gpio_matrix_in = 0x501000d4;
gpio_matrix_out = 0x501000d8;
gpio_bypass_matrix_in = 0x501000dc;
gpio_output_disable = 0x501000e0;
gpio_output_enable = 0x501000e4;
gpio_pad_input_disable = 0x501000e8;
gpio_pad_input_enable = 0x501000ec;
gpio_pad_pulldown = 0x501000f0;
gpio_pad_pullup = 0x501000f4;
gpio_pad_select_gpio = 0x501000f8;
gpio_pad_set_drv = 0x501000fc;
gpio_pad_unhold = 0x50100100;
gpio_pad_hold = 0x50100104;
gpio_lppad_select_mux = 0x50100108;


/***************************************
Group crypto
***************************************/

/* Functions */
crc32_le = 0x501000c8;
crc16_le = 0x501000cc;
crc8_le = 0x501000d0;
esp_crc8 = 0x501000d4;
crc32_le = 0x5010010c;
crc16_le = 0x50100110;
crc8_le = 0x50100114;
esp_crc8 = 0x50100118;


/***************************************
Group interrupts
***************************************/

/* Functions */
ets_intr_lock = 0x501000d8;
ets_intr_unlock = 0x501000dc;
PROVIDE( intr_handler_set = 0x501000e0 );
ets_isr_attach = 0x501000e4;
ets_isr_mask = 0x501000e8;
ets_isr_unmask = 0x501000ec;
ets_intr_lock = 0x5010011c;
ets_intr_unlock = 0x50100120;
PROVIDE( intr_handler_set = 0x50100124 );
ets_isr_attach = 0x50100128;
ets_isr_mask = 0x5010012c;
ets_isr_unmask = 0x50100130;
8 changes: 5 additions & 3 deletions components/esp_wifi/include/esp_wifi.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand Down Expand Up @@ -398,6 +398,7 @@ esp_err_t esp_wifi_restore(void);
* - ESP_OK: succeed
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
* - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start
* - ESP_ERR_WIFI_MODE: WiFi mode error
* - ESP_ERR_WIFI_CONN: WiFi internal error, station or soft-AP control block wrong
* - ESP_ERR_WIFI_SSID: SSID of AP which station connects is invalid
*/
Expand Down Expand Up @@ -1458,9 +1459,10 @@ esp_err_t esp_wifi_sta_get_negotiated_phymode(wifi_phy_mode_t *phymode);
esp_err_t esp_wifi_set_dynamic_cs(bool enabled);

/**
* @brief Get the rssi info after station connected to AP
* @brief Get the rssi information of AP to which the device is associated with
*
* @attention This API should be called after station connected to AP.
* @attention 1. This API should be called after station connected to AP.
* @attention 2. Use this API only in WIFI_MODE_STA or WIFI_MODE_APSTA mode.
*
* @param rssi store the rssi info received from last beacon.
*
Expand Down
Loading

0 comments on commit 0b1ba51

Please sign in to comment.