Commit Graph

263 Commits

Author SHA1 Message Date
Jakob Hasse
006e675656 Merge branch 'bugfix/extern_c_decl' into 'master'
esp_hw_support: Added extern "C" declaration

Closes IDF-2860

See merge request espressif/esp-idf!24217
2023-06-14 23:23:37 +08:00
Armando (Dou Yiwen)
17d6768e65 Merge branch 'feature/add_target_esp32p4' into 'master'
esp32p4: introduce the target

See merge request espressif/esp-idf!24155
2023-06-14 10:16:44 +08:00
Jakob Hasse
e87ac7255c esp_hw_support: Added extern "C" declaration 2023-06-13 13:44:21 +02:00
Konstantin Kondrashov
ac188ad074 Merge branch 'bugfix/mac_ext_order_for_c6_h2' into 'master'
esp_hw_support: Change the byte order of MAC for IEEE802154 (C6 and H2 chips)

Closes IDF-6809

See merge request espressif/esp-idf!23988
2023-06-13 16:08:13 +08:00
Armando
101e6a18eb esp32p4: introduce the target
Add esp32p4 target to tools and Kconfig
Create directories and files that are essential for `idf.py --preview set-target esp32p4`
2023-06-13 15:16:11 +08:00
KonstantinKondrashov
f7dfd1f48e mac_addr(C6 and H2): Fix byte order of MAC_EXT and change format of IEEE802154 MAC
The changes only related to C6 and H2 chips where CONFIG_SOC_IEEE802154_SUPPORTED=y.
For this case these APIs return 8 bytes
    esp_efuse_mac_get_default() -> 8 bytes
    esp_efuse_mac_get_custom() -> 8 bytes
    esp_read_mac(..., ESP_MAC_IEEE802154) -> 8 bytes
The rest cases len is 6 bytes
2023-06-08 23:11:32 +08:00
Mahavir Jain
c20f640d51 Merge branch 'feature/anti_dpa_configuration_c6_h2' into 'master'
esp32c6/esp32h2: crypto: add support for DPA protection configuration

Closes IDF-6973

See merge request espressif/esp-idf!23921
2023-06-08 22:49:21 +08:00
Mahavir Jain
1696be719c
crypto: add support for DPA protection configuration in C6/H2
- Technical details covered in section "15.3.2 Anti-DPA Attack Security
Control" chapter of the ESP32-C6 TRM
- Default configuration sets the security level low for the DPA
protection
- This change applies to all the crypto peripherals where the clock
frequency is dynamically adjusted to create randomness in the power
consumption trajectory
- This configuration helps to make the SCA attacks difficult on the
crypto peripherals
2023-06-08 11:09:23 +05:30
laokaiyao
71ef56f988
gdma: support on_recv_done callback 2023-06-07 11:38:32 +08:00
xuxiao
722c60c14b esp_wifi: itwt add setup timeout timer to track response frame 2023-06-02 21:10:32 +08:00
wuzhenghui
5c74093300 bugfix: treat too short sleep duration as sleep reject by software 2023-05-29 16:35:03 +08:00
Niklas Gürtler
be8a0d08f2 gdma: implement descriptor error callback
Merges https://github.com/espressif/esp-idf/pull/11499
2023-05-26 13:24:34 +08:00
laokaiyao
ffb40a89d9 adc_cali: supported channel compensation of adc calibration on esp32c6 2023-05-23 22:44:25 +08:00
Cao Sen Miao
e304db558b temperature_sensor: Add new interface and reference counts so that phy and driver can use together 2023-05-17 17:40:59 +08:00
Marius Vikhammer
0036e555e9 Merge branch 'contrib/github_pr_11388' into 'master'
Update esp_cpu.h to include esp_attr.h (GitHub PR)

Closes IDFGH-10113

See merge request espressif/esp-idf!23711
2023-05-16 09:20:07 +08:00
Magnus Sörensen
004d55a5ed
Update esp_cpu.h
If esp_attr.h is not included then there are no definitions for the symbol 'FORCE_INLINE_ATTR'.
2023-05-11 21:23:57 +02:00
Jakob Hasse
c8791f30c0 compiler: replaced noreturn by __noreturn__ in header files
* noreturn may be replaced by third-party macros,
  rendering it ineffective

* Closes https://github.com/espressif/esp-idf/issues/11339
2023-05-11 16:07:45 +08:00
Li Shuai
87dd7bb51a Merge branch 'bugfix/support_esp32c6_sleep_retention_extra_link' into 'master'
support extra linked list retention for BLE and 15.4

Closes IDF-6528

See merge request espressif/esp-idf!22985
2023-05-10 15:07:03 +08:00
Li Shuai
2e22491b02 sleep retention: implement the extra linked list retention for modules with retention clock bugs 2023-05-06 14:58:00 +08:00
Armando
8eec6558d1 mspi: refactor timing tuning driver to make it compatible with p4 2023-05-04 17:05:35 +08:00
Jakob Hasse
0a3cfce671 Merge branch 'contrib/github_pr_10895' into 'master'
Fix possible conversion errors by using __builtin_ffsll (GitHub PR)

Closes IDFGH-9541

See merge request espressif/esp-idf!23429
2023-05-04 10:41:46 +08:00
Jakob Hasse
ca44fc3847 cxx/esp_hw_support: added build test, changed parameter types
Changed rv_utils_intr_edge_ack and esp_cpu_intr_edge_ack to
take uint32_t instead of int to avoid build errors.

The test is to test in particular that __builtin_ffsll, used in
xt_utils.h, which is included via esp_cpu.h, compiles fine
in C++20 with -Wsign-conversion enabled.

Closes https://github.com/espressif/esp-idf/pull/10895
2023-04-26 19:06:39 +08:00
Zim Kalinowski
4a647d08de Merge branch 'feature/c6_ulp_sleep' into 'master'
ulp: added sleep support for lp core

Closes IDF-7012

See merge request espressif/esp-idf!23103
2023-04-25 22:40:52 +08:00
Mahavir Jain
a8b6a70620 Merge branch 'feature/add_bignum_ll_layer' into 'master'
bignum: added bignum hal and ll layer

Closes IDF-7071

See merge request espressif/esp-idf!22823
2023-04-25 19:50:25 +08:00
Song Ruo Jing
a4e8960ab4 esp_clk_tree: Rename clk_tree_xxx to esp_clk_tree_xxx, add compilation warning to clk_tree.h 2023-04-25 14:12:06 +08:00
Marius Vikhammer
359b237cc5 ulp: added sleep support for lp core
Added support for running LP core while hp core sleeps, as well
as waking up the hp core.
2023-04-25 11:51:35 +08:00
harshal.patil
56327452ce esp_hw_support: add crypto lock layer for esp32 2023-04-24 16:15:11 +05:30
laokaiyao
b7053b46ef esp32h4: remove esp32h4 target from peripherals 2023-04-20 15:19:45 +08:00
Laukik Hase
f6aadd1e39
esp_hw_support: Update memory ptr location/property checks
- to acknowledge the unused DCACHE added to DRAM for ESP32-S3

- For ESP32-S3, when the DCACHE size is set to 16 kB, the unused 48 kB is added to
  the heap in 2 blocks of 32 kB (from 0x3FCF0000) and 16 kB (from 0x3C000000).
- But, if we try allocating memory from the 16 kB block and run an `esp_ptr_internal`
  check on that memory pointer, it fails as the address block from 0x3C000000
  corresponds to the external memory symbols SOC_DROM_LOW and SOC_EXTRAM_DATA_LOW.
  (E.g. freertos - If the IDLE task stack buffer gets allocated from this region,
  the firmware will abort due to this failure).
- Thus, the checks `esp_ptr_internal`, `esp_ptr_in_drom` and `esp_ptr_byte_accessible`
  have been updated to acknowledge this memory as a part of the DRAM.

Co-authored-by: Mahavir Jain <mahavir@espressif.com>
2023-04-17 10:42:04 +05:30
Li Shuai
94ebda298a fix the issue of failure of receiving beacons in modem state caused by enabling light sleep in wifi min/max modem sleep mode 2023-04-07 05:57:15 +00:00
morris
6c19e7b8a7 gdma: avoid manually start/stop when channel is controled by ETM 2023-04-06 10:49:32 +08:00
morris
1429913042 gdma: support override default channel priority 2023-04-06 10:49:32 +08:00
Marius Vikhammer
a5c70c24e5 Merge branch 'bugfix/memprot_cleanup_iram_attr' into 'master'
memprot: move memprot functions out of IRAM

See merge request espressif/esp-idf!20697
2023-03-28 10:18:22 +08:00
Michael (XIAO Xufeng)
dbbc1ba5be Merge branch 'feat/merge_nuttx_patch' into 'master'
G0, G1: fix issues that prevents using G0/G1 components on other platforms

See merge request espressif/esp-idf!22521
2023-03-21 20:48:21 +08:00
Wu Zheng Hui
a79c5ef7ed Merge branch 'bugfix/esp32c6_deep_sleep_minor_fixes' into 'master'
bugfix: esp32c6 deep sleep minor fixes

Closes WIFI-5559, WIFI-5425, WIFI-3494, WIFI-3495, WIFI-4163, and WIFI-4164

See merge request espressif/esp-idf!22697
2023-03-18 14:41:43 +08:00
Kevin (Lao Kaiyao)
d659991bbb Merge branch 'feature/gpio_runtime_preserve' into 'master'
gpio: support runtime reserve

Closes IDF-6731

See merge request espressif/esp-idf!22223
2023-03-18 10:55:44 +08:00
wuzhenghui
c50e5d45a3 feature: add deep sleep prepare callback hook 2023-03-17 19:45:56 +08:00
Jiang Jiang Jian
73c06b5039 Merge branch 'bugfix/sleep_current_issue_caused_by_sar_adc' into 'master'
sleep current issue caused by sar adc

Closes IDF-6111 and WIFI-4370

See merge request espressif/esp-idf!22769
2023-03-17 17:32:59 +08:00
Marius Vikhammer
43784e7a24 memprot: move memprot functions out of IRAM
Memprot functions are no longer placed by default in IRAM,
selecting ESP_PANIC_HANDLER_IRAM will still force panic related memprot
functions to be placed in IRAM.
2023-03-17 14:51:20 +08:00
Li Shuai
a25ce78392 sleep: fix sleep current issue caused by sar adc 2023-03-17 13:06:39 +08:00
laokaiyao
c9f780dc2e gpio: support runtime preserve 2023-03-17 11:59:49 +08:00
Gustavo Henrique Nihei
459ebff4ff esp_hw_support: Fix check for SOC_MODEM_CLOCK_IS_INDEPENDENT definition
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-03-16 01:50:22 +08:00
Mahavir Jain
891df4eff9
Cleanup soc_memprot_types.h for C6/H2
This header is not required as there is no PMS peripheral in C6/H2

Closes IDF-6332
2023-03-15 13:16:27 +05:30
Jiang Jiang Jian
abc43d8e94 Merge branch 'bugfix/some_small_fix_for_sleep' into 'master'
esp_hw_support/sleep: update soc caps for chips that support power down modem

Closes WIFI-4424

See merge request espressif/esp-idf!20198
2023-03-13 10:47:26 +08:00
jingli
cb0f517fe3 soc/soc_caps: update soc caps for chips that support power-down of modem hardware
Closes WIFI-4424
2023-03-10 14:15:27 +08:00
Nachiket Kukade
4c76af3f68 esp_wifi: Add support for NAN Discovery and Datapath
Update wifi lib with below -
1. Create NAN Discovery SM for beaconing & cluster formation
2. Create NAN interface for Tx/Rx of beacons & action frames
3. Add commands & events for NAN Services Publish/Subscribe/Followup
4. Add NAN Datapath definitions, Events, Peer structures
5. Support for forming and parsing of Datapath related attributes
6. Modules for NDP Req, Resp, Confirm, Term, Peer management
7. NAN Interface related additions in Datapath, Data Tx Q's

In addition include below changes -
1. Add netif and driver support for NAN Interface
2. Add simple examples for Publisher-Subscriber usecases
3. Add an advanced console example that supports commands
   for NAN Discovery, Services & Datapath
4. Add wifi_apps for providing better NAN API's and Peer management

Co-authored-by: Shyamal Khachane <shyamal.khachane@espressif.com>
2023-03-10 11:18:23 +05:30
Li Shuai
1a10eabe41 Power Management: refactor the configuration of each module in sleep mode 2023-03-04 00:17:40 +08:00
Li Shuai
200f69e6eb auto beacon: support esp32c6 autobeacon (advanced DTIM sleep feature)
modem retention: Support esp32c6 wifi MAC and baseband sleep retention

sleep_modem: wifi MAC modem wakeup protect in modem state before PMU trigger sleep enable request

sleep modem: provide a interface to get whether the Modem power domain is allowed to power off during sleep

add i2c_ana master header file to project

auto beacon: release PMU's lock on root clock source (it is locked in the PLL)

wifi receiving beacon frame in PMU modem state strongly depends on the BBPLL
clock, PMU will forcibly lock the root clock source as PLL, when the root
clock source of the software system is selected as PLL, we need to release
the root clock source locking.

When it is judged that the PLL is locked by PMU after wakeing up from the PMU
modem state, switch the root clock source to the PLL in the sleep process (a
critical section).

auto beacon: fix the failure to receive broadcast/multicast frames in modem state

When the multicast field in the beacon frame received in the PMU modem state is
True, the PMU switches to the PMU active state (the PMU waits for the HP LDO to
stabilize and then restores the MAC context) and starts to receive
broadcast/multicast frames (Broadcast/Multicast frames will be sent after a
minimum delay of 48 us after the beacon frame), because the PMU waits for the HP
LDO to stabilize too long (~154 us), which will cause broadcast/multicast frame
reception to be missed.

auto beacon: select the PLL clock source as the REGDMA backup clock source when the PMU switches to ACTIVE from MODEM state

update Digital Peripheral (M2A switch) REGDMA restore time parameter

auto beacon: fix the issue that only channel 1 can connect to AP in modem state
2023-03-04 00:17:40 +08:00
Li Shuai
93c02fed3b light sleep: add modem power domain and power down the modem power domain during sleep 2023-03-04 00:17:40 +08:00
Li Shuai
3a5fe2ab63 light sleep: rename sleep mac bb to modem, it includes MAC and baseband of wifi, bt and ieee802.15.4 modules 2023-03-04 00:17:40 +08:00