Skip to content

ESP-IDF Release v3.2

Compare
Choose a tag to compare
@projectgus projectgus released this 11 Apr 03:36
· 31978 commits to master since this release

Documentation for release v3.2 is available at https://docs.espressif.com/projects/esp-idf/en/v3.2/

ESP-IDF v3.2 is a minor update for ESP-IDF v3.1.x. Release v3.2 is compatible with apps written for ESP-IDF v3.1.x, but features in v3.2 may not be available in earlier versions.

This is the list of changes since release v3.1.3:

Known Issues

  • Watchdog timeout when using an RSA 4096-bit key to connect to WPA2-Enterprise (EAP-TLS) AP.
  • ESP32 SoftAP mode may fail to deliver multicast packets to stations which have power save modes enabled.

Major New Features

Breaking Changes

  • RMT peripheral: Removed incorrect rmt_item16_t register access type. Use existing rmt_item32_t instead.
  • ESP-MESH: When Mesh IE encryption is enabled, Mesh V3.1 devices cannot connect to Mesh V3.2 devices. Devices with unencrypted Mesh IE can connect between versions, although features added in V3.2 will not work well in a mixed-version mesh.

Changes not compatible with earlier versions

These changes do not require any action when updating to V3.2, but will require consideration if moving from V3.2 to an earlier version.

  • NVS: Support has been added for NVS blobs larger than 1984 bytes. NVS partitions created from earlier ESP-IDF versions will be automatically updated when written from ESP-IDF V3.2. NVS partitions written from ESP-IDF V3.2 are not compatible with the NVS format used by earlier versions of ESP-IDF. It is possible to support the updated NVS partition format in ESP-IDF v3.1.x via the "Enable multi-page blob support" config option.
  • Wear Levelling: Wear Levelling flash partition format has been updated to Version 2, to support flash encryption. Version 1 Wear Levelling partitions will be automatically updated to Version 2. Version 2 partitions are not compatible with ESP-IDF V3.1.x or earlier.

Wi-Fi Related

  • Added internal API to enable or disable transmitting WiFi MAC frame with fixed rate.
  • Fixed bug that ESP32 crashes because of WiFi static TX buffer alloc/free.
  • Enabled Soft-AP receiving BAR to fix the issue that iphone fails to connect to Soft-AP.
  • Fixed the issue that STA fails to connect to some APs after reset.
  • wpa_supplicant: Implemented BIGNUM and ECC crypto wrapper apis for ESP using mbedtls.
  • Fixed the index of the invalid channel state information(CSI) data.
  • Corrected a mistake of CSI sub-carrier index in Wi-Fi documentation.

Smartconfig Related

  • Added support for broadcast packets sent by newer versions of ESP-TOUCH (useful for 5GHz router compatibility). Multicast packets sent by earlier versions of ESP-TOUCH are also still supported.
  • Fixed the declaration of remote_ip in sc_ack_send_task()

ESP-MESH Related

  • Note: When Mesh IE encryption is enabled, Mesh V3.1 devices cannot connect to Mesh V3.2 devices. Devices with unencrypted Mesh IE can connect between versions, although features added in V3.2 will not work well in a mixed-version mesh.

New Functionality

  • Removed dependencies which cause mesh code to be linked even if mesh is not used
  • Dynamically malloc the routing table
  • Support for not configuring the network channel
  • Support not configuring the router BSSID even if the router is hidden
  • Added allow_channel_switch to mesh configuration
  • Added allow_router_switch to mesh router configuration
  • Support handling beacon without IE of DS Parameter Set
  • Support dynamically modify IE encrypt after mesh is started
  • Automatically detect and resolve root conflicts when router BSSID is not set
  • Modify the max routes limitation from 300 to 1000
  • Add an event MESH_EVENT_NETWORK_STATE that contains information about whether there is a root in the current network
  • Add APIs esp_mesh_disconnect() and esp_mesh_connect()
  • RAM usage reduced 3KB RAM by removing an unnecessary task

Fixes

  • Fixed STAs can not detect disconnection from AP when encrypt transmission is used
  • Fixed memory leak when esp_mesh_stop() is called, the memory occupied by the transmitting remove announcement is not released
  • esp_mesh_connect() will be ignored if mesh automatic reconnection is enabled
  • Fixed vote reason is cleared before vote is done
  • Fixed issues in the example of manual_networking when mesh network is encrypted
  • When root can not connect to the router due to NO_MORE_STAS (reason code:5), root will stop re-connection and perform MESH_NWK_LOOK_FOR_NETWORK
  • Fixed disconnection caused by receiving a deauth frame from non-parent node during scanning
  • Fixed routing table redundant issue due to remove announcing is not 100% reliable
  • Fixed when a STA has not yet completed the 4-way handshake but the max replay count is reached, AP does not deauth the STA
  • New logic: During parent selection, the AP which is found without extended associated IE will be considered it has the same router BSSID as device itself
  • When STA leaves from AP, AP will now always post SYSTEM_EVENT_AP_STADISCONNECTED to mesh layer regardless of whether the STA has passed the encrypted authentication or not
  • Fixed ap_loss that occurs when the parent turns off the mesh function and becomes a normal Wi-Fi with a different SSID
  • Fixed in the process of re-voting to select the root, the device votes for itself even though it does not meet the conditions of being a root
  • Fixed issues in esp_mesh_recv_toDS() when stopping the mesh
  • When the user specifies a parent for the device, the device will now set the authmode and password of its Soft-AP mode to the same value as the specified parent
  • Fixed failure of mesh stop caused by block-sending
  • Fixed when FIXED_ROOT is set, 2nd layer devices can not receive mesh event ESP_ERR_MESH_NO_PARENT_FOUND
  • Fixed when FIXED_ROOT is set and the root turns off mesh function, 2nd layer devices do not look for new parents
  • Now disconnects from parent/router when the DSSS channel in received beacon is different from the home channel

Bluetooth Related

Coexist

Fixes

  • Fixed LC protection cause memory corrupted (Strange crash like IllegalInstruction, LoadProhibited and ...)

Classic BT

  • Added Secure Simple Pairing
  • Added Legacy Pairing

BLE Related

New Functionality

  • Added esp_ble_gap_clear_rand_addr() function to clear random address
  • Added sequential check when add include service
  • Added “service from” param in ESP_GATTC_SEARCH_CMPL_EVT
  • Added gatts send service change indication API
  • Added peer addr type check when set adv params
  • Added auto disconnection when ACCEPT_SPECIFIED_SEC_AUTH operation is failed
  • Added set/clear static passkey option in esp_ble_gap_set_security_param()
  • Added attr_handle for ESP_GATTS_CONF_EVT
  • Added advertisement data filter in scan duplicate

Fixes

  • Optimize bluetooth memory debug
  • Fixed PASSERT_PARAM(2051 0) error generated in llc_util.c
  • Fixed wrong return callback status ESP_GATT_STACK_RSP when do multiple read
  • Fixed remove/get bond list failed
  • Fixed crash when BLE do SMP connect and disconnect stress test
  • Fixed wrong prefered connection interval when setting in adv params
  • Fixed memory leak in service change char
  • Fixed iPhoneX get error when getting wifi list
  • Fixed crash when test multi_connection
  • Fixed reconnect failed in SMP when slave using static random address
  • Fixed stop adv error in dual core
  • Fixed register multi service change when register multi gattc
  • Fixed connection params update issues
    • connection parameters update cause link loss while data is being sent
    • BLE disconnect while connection parameters is reject by LL_REJECT_IND
  • Fixed BLE connection crash when there's higher priority task or interrupt run on the same CPU.
  • Fixed invalid handle value in gatts conf event when GATT server sends indication
  • Fixed crash caused by writing characteristic operation after disconnection
  • Fixed invalid operation of storing keys during authentication when bonding is not required
  • Fixed incorrect authentication mode when doing reconnection after encryption
  • Fixed that some advertising reports are discarded when duplicate scan is enabled
  • Fixed not checking peer address type in setting advertising parameters
  • Fixed not checking scan window and interval when setting scan parameters
  • Fixed when failed in ACCEPT_SPECIFIED_SEC_AUTH, disconnection is not performed
  • Fixed slave connection interval error when setting slave advertising parameters
  • Fixed uncommon crash during BLE reconnect/rescan or readv

Ethernet related

New functionality

  • Added support for new ethernet PHY: IP101
  • Added esp_eth_deinit() function to disable Ethernet and free memory
  • Moved some compile-time configuration options to Kconfig

Fixes

  • Fixed bug when using EMAC_DMAOPERATION_MODE_ERG
  • Improved LWIP pbuf management
  • Increased ethernet driver performance by moving key functions to IRAM
  • Removed some duplicated function declarations and code
  • Disabled promiscuous mode
  • Added timeout for PHY initialization

LWIP related

New Functionality

Fixes

  • Fixed leak when accept() fails due to max socket limit
  • Removed an assert in DHCP client which may be triggered if a packet is altered
  • Fixed UDP recvfrom() from & fromlen check
  • Default stack size for TCP/IP task increased from 2048 to 3072 bytes

mDNS related

New Functionality

Fixes

  • Fixed memory leak when query for services receives multiple PTR entries for one instance
  • Fixed possible crash when mdns_free called while action queue not empty
  • Fixed invalid query_txt
  • Fixed memory leak in pbuf if tcpip_adapter failed to get network interface
  • Fixed possible crash when packet queued for transmit referenced a deleted service
  • Fixed a race condition when updating packet data from a user task if allocation/queueing failed
  • Fixed a possible deadlock in mdns deinit when calling mdns_free()
  • Fixed concurrent access to mdns PCBs when starting the service thread
  • Fixed a possible crash when probing a particular interface whose network has naming conflicts
  • Fixed task synchronization to use a semaphore not a mutex
  • Fixed a possible crash when adding or removing a service apt for conflict resolution, i.e. if the local network contains multiple instances of a service with the same name.

MQTT

Network Protocol Related

HTTP Client

New Functionality

  • Added HEAD method support (#2093)
  • Added support for OPTIONS, SUB, UNSUB and NOTIFY HTTP methods
  • Added support for non-blocking socket options

Fixes

  • Fixed content-type header overwritten by esp_http_client_set_post_field()
  • Fixed bugs when reading HTTP chunked encoding
  • Fixed indefinite blocking when reading TLS connection where no data is available
  • Improved debugging information for failures (#2135)
  • Fixed out of bounds write in http_perform_as_stream_reader (#2208)
  • Fixed HTTP basic auth failurte is password is too long (#2213)

mbedTLS

New Functionality

Fixes

  • Fixed bug where mbedTLS hardware support might grow a bignum and corrupt memory in some Elliptic Curve algorithms (which assumed number would not be grown). (#1556)

openssl

  • Fixed verify_mode checking in ssl_pm_reload_crt() (#2162)

ESP-TLS

  • Added support for network timeouts
  • Added support for non-blocking connect
  • Added support for global certificate store
  • Added support for mutual SSL authentication (#2688)

CoAP

  • Fixed failure to send large CoAP responses

HTTP2

  • Fixed bug in send functionality

App Trace Related

  • Host File I/O: Fix uninitialized 'offset' and 'whence' fseek args

Bootloader related

  • Fixed issues when bootloader was compiled for a different CPU frequency than the app (#2731)
  • Ensured bootloader main() routine never returns to caller
  • Enabled RTC WDT in bootloader to handle power supply glitches or other problems during early boot

System Related

  • esp32: Added API to get chip reset reason
  • esp32: Fixed a case where not all libgcc pure math functions were linked to ROM
  • esp32: Fixed division by zero when calculating RTC clock calibration (#2147)
  • esp32: New configuration option to place RTC data in RTC fast memory. This helps when developing deep sleep wake stubs.
  • esp32: New esp_fill_random() function
  • esp32: esp_pm_configure function now allows setting lower frequencies in idle state (10MHz, 20MHz).
  • esp32: Automatic Light Sleep support to reduce power consumption, including while maintaining Wi-Fi connection
  • heap: Added integer overflow checks
  • heap: Fixed a bug where heap metadata could be allocated from SPIRAM in some circumstances
  • heap: Fixed crash in heap poisoning code if a non-32-aligned size was allocated as MALLOC_CAP_32BIT
  • heap: Fixed heap poisoning bug where entire buffer was still overwritten if verification failed, making analysis more difficult
  • heap: Removed size limit on internal reserved memory pool when some SPIRAM is enabled
  • ipc: fix esp_ipc_call_blocking to return after callback execution is completed
  • memory: Added link-time static memory reservation. For example, if Bluetooth is enabled in menuconfig but no BT functions are linked into the final application, no reserved Bluetooth memory is used.
  • newlib: Added getrandom() function
  • newlib: Added missing implementations of some POSIX_TIMERS functions (#1302)
  • pthread: Add support for pthread attributes, pthread_mutex_timedlock(), pthread_exit()
  • task wdt: New esp_task_wdt_isr_user_handler function (#2270)
  • vfs: Added basic support for termios.h
  • Various small fixes for GCC 8 support

Register and Low-Level System Related

  • RMT: Removed buggy rmt_item16_t register access type, added notes discouraging/deprecating accessing the RMT peripheral in FIFO mode
  • RTC WDT: Added API for configuring RTC WDT
  • Corrected smaller trace memory reservation region in single core mode
  • Added support for 32kHz external oscillator (different to existing XTAL support)
  • Now aborts cleanly when running a dual core firmware on a single core only chip
  • Panic handler: Following IllegalInstructionException, dump some instruction memory

FreeRTOS Related

  • Added option to display xCoreID in vTaskList output (#2064)
  • Idle task names now include Core ID
  • New option (enabled by default) to abort with a clear error if a task function returns, rather than crash
  • Moved ringbuffer from FreeRTOS to a standalone component
  • Fixed behaviour if "legacy" FreeRTOS tick and idle hooks are enabled in project configuration
  • Backtracing now works across interrupts
  • Made xPortGetCoreID() function volatile, fixing an issue where core ID may not be correctly updated when called twice in an un-pinned function. (#3093)

Peripheral Driver Related

New functionality

  • CAN driver
  • GPIO: New API for deep sleep hold state
  • I2S: Added optional support to clear tx descriptor in underflow case (#1789)
  • RMT: New API for rmt_get_idle_level() (#2666)
  • RTC: Added wakeup function support for RTC GPIOs
  • SDMMC: Added eMMC support, including DDR mode for 3.3V eMMC
  • SPI Master: Added macros for directly reading/writing multi-byte data with correct endianness
  • UART: Added RS-485 half duplex interface support

Fixes

  • MCPWM: Fix naming mismatch in mcpcm API
  • RMT: Suppress error log from rmt_wait_tx_done() if wait_time==0 (allows polling) (#2666)
  • RTC: Fixed memory leak in rtc_isr_deregister()
  • SDIO Slave: Improved SDIO slave when using high speed and 4 bit mode
  • SDIO: Support enabling internal pullups of the SDIO host and slave as a debug feature
  • SDMMC: Disabled pulldowns on all pins when assigned to the SDMMC host
  • SPI Master: Fixed bug where cs_ena_pretrans option was only allowed full duplex mode if command and address phases were enabled
  • SPI Master: Fixed support for non-DMA transactions of up to 64 bytes
  • SPI Slave: New configuration option to place SPI slave ISR into IRAM
  • UART: Fixed uart_tx_wait_idle() to wait for last byte in FIFO to be transmitted

Storage Related

New functionality

  • New API for getting of an app binary image or a partition
  • NVS: Added support for NVS encryption (in conjunction with flash encryption)
  • NVS: Added support for NVS blobs larger than 1984 bytes. (This support can optionally be added in v3.1.x by enabling the "Enable multi-page blob support" config option, but is permanent in v3.2. NVS partitions with this change are not backwards compatible with ESP-IDF versions that do not support this change.)
  • NVS partition generator: Added check for minimum partition size (#2472)
  • Wear Levelling: Wear Levelling flash partition format has been updated to Version 2, to support flash encryption. Version 1 Wear Levelling partitions will be automatically updated to Version 2. Version 2 partitions are not compatible with ESP-IDF V3.1.x or earlier.

Fixes

  • nvs: Fixed out of memory issues due to lazy NVS HashListBlock cleanup (#1642)
  • spi_flash: Fixed a bug where sometimes faster block erase (64KB) operations would not be used
  • spi_flash: Raised priority of any task performing a SPI flash operation, to avoid starving other tasks

Third Party Libraries

  • Added Google's protocol buffer C library v1.3.0 (protobuf-c)
  • Update libexpat to v2.2.5 and added platform entropy source
  • Update AWS IoT SDK to v3.0.1

Debugging Related

  • coredump: Added support for ROM ELF file to 'espcoredump', will show ROM symbols in traces
  • coredump: Fixed initalization of exception stack frame structure

Build System Related

  • cmake: Fix for PSRAM bugfix compiler flag not being applied when building with CMake and PSRAM enabled
  • Fixed issue where EXTRA_COMPONENT_DIRS variable could cause some components in subdirectories to be incorrectly added
  • Partition table tool now prints a warning if the partition table is set to a name which doesn't match the type & subtype
  • Partition table tool now ensures all names are unique
  • New make erase_ota command to erase OTA data before flashing
  • Fixed compatibility with very old version of flex (#2703)

Examples Related

  • Standardized and expanded the README files for a number of examples
  • New SDIO example using SDMMC host to communicate with SDIO slave peripheral
  • CoAP example: Fixed a bug in call to gethostbyname()
  • UDP Multicast example: Fixed memory leak in getaddrinfo() calls
  • A2DP Sink example: Fix error message printed if initialization fails (#2261)

Ultra Low Power Coprocessor Related

  • Corrected ULP wakeup period setup API to account for time the ULP FSM spends on internal tasks before being able to execute the program

Documentation Related

  • Visible links to switch document pages between English & Chinese translations, where available
  • New "Creating Examples" documentation, template example README
  • SDIO slave: peripheral protocol documentation
  • Clarified some Eclipse setup steps
  • Renamed ESP- to ESP32--D/U
  • JTAG: Add explanation of software flash breakpoints

Obtaining v3.2

For full installation instructions, see the ESP-IDF Programming Guide.

The source files attached to this release will not work due to our use of git submodules. Use one of the following methods instead:

Using git

To get this release, use the following commands:

git clone -b v3.2 --recursive https://github.com/espressif/esp-idf.git esp-idf-v3.2
cd esp-idf-v3.2/

This is the recommended way of obtaining v3.2 of ESP-IDF.

Download an archive with submodules included

Attached to this release is an esp-idf-v3.2.zip archive. It includes .git directory and all the submodules, so can be used out of the box. This archive is provided for users who have connectivity issues preventing them from cloning from GitHub.

This archive can also be downloaded from Espressif's download server:
https://dl.espressif.com/dl/esp-idf/releases/esp-idf-v3.2.zip