The SPI bus lock on SPI1 introduces two side effects:
1. The device lock for the main flash requires the
`CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION` to be selected, however this
option is disabled by default in earlier IDF versions. Some developers
may find their project cannot be built by their old sdkconfig files.
2. Usually we don't need the lock on the SPI1 bus, due to it's
restrictions. However the overhead still exists in this case, the IRAM
cost for static version of semaphore functions, and the time cost when
getting and releasing the lock.
This commit:
1. Add a CONFIG_SPI_FLASH_BYPASS_MAIN_LOCK option, which will forbid the
space cost, as well as the initialization of the main bus lock.
2. When the option is not selected, the bus lock is used, the
`CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION` will be selected explicitly.
3. Revert default value of `CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION`
to `n`.
introduced in 49a48644e4
.
Closes https://github.com/espressif/esp-idf/issues/5046
32 lines
1.2 KiB
Text
32 lines
1.2 KiB
Text
menu "Example Configuration"
|
|
|
|
config EXAMPLE_USE_SPI1_PINS
|
|
bool "The example uses SPI1 shared pins for EEPROM connection"
|
|
default n
|
|
depends on SPI_FLASH_SHARE_SPI1_BUS
|
|
help
|
|
Enable this option will make the EEPROM use SPI1 pins, which is shared with the main
|
|
flash chip.
|
|
|
|
Currently this example hasn't supported SPI1 pins on other chips yet.
|
|
|
|
config EXAMPLE_INTR_USED
|
|
bool "Use the interrupt to detect the eeprom busy"
|
|
default y
|
|
depends on !EXAMPLE_USE_SPI1_PINS
|
|
help
|
|
Enable this option will allow the example to be blocked while the EEPROM is working
|
|
in progress, and unblocked by GPIO interrupt. Otherwise the example will keep polling
|
|
until the EEPROM is idle.
|
|
|
|
config EXAMPLE_5V_COMMANDS
|
|
bool "The EEPROM is supplied by 5V power"
|
|
default n
|
|
help
|
|
The Erase_All and Write_All commands of EEPROM are only supported when EEPROM is
|
|
supplied by 5V power. Enable this to use those two commands.
|
|
|
|
But please note that ESP chips don't support 5V IO, you need to add external
|
|
level-shifting circuits between ESP chip to the EEPROM.
|
|
|
|
endmenu
|