mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
08600cb1a3
The commit 88e4c06028
introduced a loop timeout for all ULP RISC-V I2C
transactions to avoid getting stuck in a forever loop. The loop timeout
was set to 500 msec by default. This commit improves on the concept by
making the loop timeout configurable via a Kconfig option in terms of
CPU ticks. If the timeout is set to -1 value then the transaction loops
will never timeout, therefore restoring the driver behavior before the
timeout was introduced.
The commit also updates the I2C Fast mode timings for esp32s2 which need
to be adjusted due to bus timing constraints.
Closes https://github.com/espressif/esp-idf/issues/11154
69 lines
2.6 KiB
Plaintext
69 lines
2.6 KiB
Plaintext
menu "Ultra Low Power (ULP) Co-processor"
|
|
depends on (SOC_ULP_SUPPORTED || SOC_RISCV_COPROC_SUPPORTED || SOC_LP_CORE_SUPPORTED)
|
|
|
|
config ULP_COPROC_ENABLED
|
|
bool "Enable Ultra Low Power (ULP) Co-processor"
|
|
default "n"
|
|
help
|
|
Enable this feature if you plan to use the ULP Co-processor.
|
|
Once this option is enabled, further ULP co-processor configuration will appear in the menu.
|
|
|
|
choice ULP_COPROC_TYPE
|
|
prompt "ULP Co-processor type"
|
|
depends on ULP_COPROC_ENABLED
|
|
default ULP_COPROC_TYPE_RISCV if (IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3)
|
|
help
|
|
Choose the ULP Coprocessor type: ULP FSM (Finite State Machine) or ULP RISC-V.
|
|
|
|
config ULP_COPROC_TYPE_FSM
|
|
bool "ULP FSM (Finite State Machine)"
|
|
depends on SOC_ULP_FSM_SUPPORTED
|
|
config ULP_COPROC_TYPE_RISCV
|
|
bool "ULP RISC-V"
|
|
depends on SOC_RISCV_COPROC_SUPPORTED
|
|
config ULP_COPROC_TYPE_LP_CORE
|
|
bool "LP core RISC-V"
|
|
depends on SOC_LP_CORE_SUPPORTED
|
|
endchoice
|
|
|
|
config ULP_COPROC_RESERVE_MEM
|
|
int
|
|
prompt "RTC slow memory reserved for coprocessor"
|
|
depends on ULP_COPROC_ENABLED
|
|
default 512 if IDF_TARGET_ESP32
|
|
default 4096 if !IDF_TARGET_ESP32
|
|
range 32 8176 if !IDF_TARGET_ESP32C6
|
|
range 32 16352 if IDF_TARGET_ESP32C6
|
|
help
|
|
Bytes of memory to reserve for ULP Co-processor firmware & data.
|
|
Data is reserved at the beginning of RTC slow memory.
|
|
|
|
|
|
menu "ULP RISC-V Settings"
|
|
depends on ULP_COPROC_TYPE_RISCV
|
|
|
|
config ULP_RISCV_UART_BAUDRATE
|
|
int
|
|
prompt "Baudrate used by the bitbanged ULP RISC-V UART driver"
|
|
default 9600
|
|
help
|
|
The accuracy of the bitbanged UART driver is limited, it is not
|
|
recommend to increase the value above 19200.
|
|
|
|
config ULP_RISCV_I2C_RW_TIMEOUT
|
|
int
|
|
prompt "Set timeout for ULP RISC-V I2C transaction timeout in ticks."
|
|
default 500
|
|
range -1 4294967295
|
|
help
|
|
Set the ULP RISC-V I2C read/write timeout. Set this value to -1
|
|
if the ULP RISC-V I2C read and write APIs should wait forever.
|
|
Please note that the tick rate of the ULP co-processor would be
|
|
different than the OS tick rate of the main core and therefore
|
|
can have different timeout value depending on which core the API
|
|
is invoked on.
|
|
endmenu
|
|
|
|
|
|
endmenu # Ultra Low Power (ULP) Co-processor
|