feat(driver_spi): spi master support sleep retention(recovery)

This commit is contained in:
wanckl
2024-09-23 20:40:22 +08:00
parent 92d335548f
commit ef7406257a
41 changed files with 698 additions and 408 deletions

View File

@@ -305,6 +305,14 @@ Bus Acquiring
Sometimes you might want to send SPI transactions exclusively and continuously so that it takes as little time as possible. For this, you can use bus acquiring, which helps to suspend transactions (both polling or interrupt) to other Devices until the bus is released. To acquire and release a bus, use the functions :cpp:func:`spi_device_acquire_bus` and :cpp:func:`spi_device_release_bus`.
.. only:: SOC_SPI_SUPPORT_SLEEP_RETENTION
Sleep Retention
^^^^^^^^^^^^^^^
{IDF_TARGET_NAME} supports to retain the SPI register context before entering **light sleep** and restore them after waking up. This means you don't have to re-init the SPI driver after the light sleep.
This feature can be enabled by setting the flag :c:macro:`SPICOMMON_BUSFLAG_SLP_ALLOW_PD`. It will allow the system to power down the SPI in light sleep, meanwhile save the register context. It can help to save more power consumption with some extra cost of the memory.
Driver Usage
------------

View File

@@ -148,7 +148,7 @@ The following peripheral drivers are not aware of DFS yet. Applications need to
- INT_MTX
- TEE/APM
- IO_MUX / GPIO
- SPI0/1
- MSPI (SPI0/1)
- SYSTIMER
:SOC_TIMER_SUPPORT_SLEEP_RETENTION: - GPTimer
:SOC_RMT_SUPPORT_SLEEP_RETENTION: - RMT
@@ -160,6 +160,7 @@ The following peripheral drivers are not aware of DFS yet. Applications need to
:SOC_TEMPERATURE_SENSOR_SUPPORT_SLEEP_RETENTION: - Temperature Sensor
:SOC_TWAI_SUPPORT_SLEEP_RETENTION: - All TWAIs
:SOC_PARLIO_SUPPORT_SLEEP_RETENTION: - PARL_IO
:SOC_SPI_SUPPORT_SLEEP_RETENTION: - All GPSPIs
The following peripherals are not yet supported:
@@ -168,7 +169,6 @@ The following peripheral drivers are not aware of DFS yet. Applications need to
- ASSIST_DEBUG
- Trace
- Crypto: AES/ECC/HMAC/RSA/SHA/DS/XTA_AES/ECDSA
- SPI2
- PCNT
- USB-Serial-JTAG
- MCPWM