Commit graph

1743 commits

Author SHA1 Message Date
Michael (XIAO Xufeng) 9b34085053 ci: fix one ut issue when using Wrover-B module with newer ver of PSRAM
The workaround for PSRAM that will occupy an SPI bus is enabled only when:

1. used on 32MBit ver 0 PSRAM.
2. work at 80MHz.

The test used to only check 32MBit by the config option, but for PSRAM
on Wrover-B module seems to use a newer version of 32MBit PSRAM.  So it
expects the workaround to be enabled, but actually not.

This commit split the unit test into two parts:

1. check all SPI buses are available, for all configs except psram_hspi
and psram_vspi, run on regular runners (including Wrover and Wrover-B).
a hidden option is enabled so that the compiler knows it's not building
psram_hspi or psram_vspi.

2. check the specified bus are acquired, for config psram_hspi and
psram_vspi. This only run on special runner (legacy Wrover module).
2019-11-14 08:35:05 +00:00
Jiang Jiang Jian 0d1c490a7c Merge branch 'bugfix/coex_fix_some_bugs_v3.3' into 'release/v3.3'
Coexist: fix some coexist bugs (backportv3.3)

See merge request espressif/esp-idf!6435
2019-10-30 16:39:20 +08:00
Xia Xiaotian 9592346090 Coexist: fix some coexist bugs
1. Fix high beacon and broadcast packets loss ratio of WiFi to make
   MDNS test pass.
2. Improve stability of WiFi performance with a little
   sacrifice of throughput.
3. Improve BLE advertising and connection performance with dynamic
   priority. It sacrifices a little WiFi throughput, but achieves balance
   between WiFi and Bluetooth.
4. fix bug bb reset lock flag to avoid bb reset lock unhandle
5. fix bug wifi reset mac cause task watch dog timeout
6. fix bug wifi reset mac position
2019-10-29 17:18:12 +00:00
KonstantinKondrashov 696d6867b4 esp_timer: Fix System time jumps back ~54secs
Closes: https://github.com/espressif/esp-idf/issues/2513
2019-10-29 17:17:26 +00:00
KonstantinKondrashov f52b877199 esp32: Add UTs to check the System time does not jump back 2019-10-29 17:17:26 +00:00
Ivan Grokhotkov a179125fd3 esp_timer: handle esp_timer_delete in timer task
Closes https://github.com/espressif/esp-idf/issues/3458
2019-10-29 17:17:26 +00:00
Tian Hao cabe66195c fix bug that semaphore may schedule out in Critical Section
1. Since BLE full-scan feature for BLE mesh change the controller code cause this problem,
it cause coex semaphore take in "interrupt disable", then it may cause task schedule
and cause crash in freertos
2. Fix newlib lock ISR context and critical section check
3. Fix bt controller ISR context and critical section check
2019-10-29 14:43:00 +08:00
Angus Gratton 9a6526554d Merge branch 'bugfix/ut_pre_read_DPORT_and_hi_interrupt' into 'release/v3.3'
esp32: Fix UT - Check pre-read workaround DPORT and Hi-interrupt

See merge request espressif/esp-idf!6240
2019-10-21 15:10:14 +08:00
Jiang Jiang Jian 4e27cbb89f Merge branch 'feature/esp_https_ota_improvements' into 'release/v3.3'
esp_https_ota: component refactoring, bugfixes and feature additions (backport v3.3)

See merge request espressif/esp-idf!6047
2019-10-21 10:40:37 +08:00
Jiang Jiang Jian 3e3ce3da81 Merge branch 'bugfix/backport_some_wifi_fixes_1009_v3.3' into 'release/v3.3'
esp32: fix some WiFi bugs 1009 (backport v3.3)

See merge request espressif/esp-idf!6298
2019-10-18 14:25:13 +08:00
Jiang Jiang Jian e524b4b1fd Merge branch 'feature/add_psram_workaround_option_3.3' into 'release/v3.3'
make psram workaround depend on chip revison (v3.3)

See merge request espressif/esp-idf!6303
2019-10-14 21:45:07 +08:00
Angus Gratton c286416762 Merge branch 'bugfix/read_binary_image_header_via_cache_in_cpu_start_v3.3' into 'release/v3.3'
esp32: cpu_start: read binary image header via cache (backport v3.3)

See merge request espressif/esp-idf!6076
2019-10-14 11:31:19 +08:00
liu zhifu 396f477972 esp32: fix some WiFi bugs
Fix following WiFi bugs:
1. Fix the bug that wpa2 enterprise sta can connect open AP
2. Fix TKIP/CCMP PN replay attack detection bug
3. Increase buffer number type from uint8_t to uint16_t to support more than 255 buffers
4. Avoid recalculating PMK if esp_wifi_set_config() is not called
5. Fix the bug that scan done leads to crash because of uint8 overflow
6. Fix 5.5M signal test bug
2019-10-12 10:38:44 +08:00
suda-morris b3720f80c7 make psram workaround depend on chip revison
Since ESP32 revision 3, the PSRAM workaround is not needed.
2019-10-10 11:38:14 +08:00
Angus Gratton 8147d48ec8 Merge branch 'feature/add_chip_revision_to_image_header_v3.3' into 'release/v3.3'
Add chip revision into image header (v3.3)

See merge request espressif/esp-idf!6128
2019-10-10 11:24:00 +08:00
Jitin George 7d60a78b31 esp_https_ota: Add support for URL redirection, basic auth and more control with new APIs
Bugfixes:
- Fix http url redirection issue
- Fix basic/digest auth issue with http url

Features:
- Add support for adding custom http header
- Add support for reading firmware image header
- Add support for monitoring upgrade status
  - This requires breaking down esp_https_ota API such that it allows finer application level control
  - For simpler use-cases previous API is still supported

Closes https://github.com/espressif/esp-idf/issues/3218
Closes https://github.com/espressif/esp-idf/issues/2921
2019-10-09 14:02:48 +00:00
chenjianqiang 579cbd8229 esp32: cpu_start: read binary image header via cache
When flash encryption is enabled, reading via cache also decrypts the
data, whereas spi_flash_read does not.
2019-10-09 06:25:26 +00:00
KonstantinKondrashov c5b1b57b09 esp32: Fix UT - Check pre-read workaround DPORT and Hi-interrupt 2019-09-30 19:04:38 +08:00
zhangyanjiao 2d5ee438fa wifi:
1.Fix the bug that WiFi stop leads to task watchdog(526c6956)
2.Fix the WiFi init sequence bug
3.Fix smartconfig ipc crash
4.Put g_promis_buf to IRAM
5.esp_wifi_set_channel should return error when sniffer is not enabled
6.fix the bug when set WEP authmode or wrong authmode, there is no error return
7.fix the bug that STA parse authmode wrong when AP sets WPA_WPA2_PSK mode
8.fix the bug that wrong error code and wrong event when there is an auto AP in multi-ssid case
2019-09-30 12:02:46 +08:00
suda-morris 0af56e2815 Add chip revision into image header
Check chip id and chip revision before boot app image

Closes https://github.com/espressif/esp-idf/issues/4000
2019-09-27 10:24:39 +08:00
chenyudong e943181f72 test: move wifi library check to esp32-wifi-lib ci 2019-09-20 17:50:23 +08:00
xiehang 2dc98f3be8 WiFi: Modify the wifi_country struct in VNC to keep it consistent with IDF.
1. Modfy wifi_country struct
2. Add md5 check esp_wifi_types.h
3. Add md5 check esp_wifi.h
2019-09-20 17:50:19 +08:00
liu zhifu 3badf6ebd9 mesh: fix the bug that esp_mesh_stop() doesn't return 2019-09-20 17:49:49 +08:00
liu zhifu 9a1b11c813 esp32: fix wifi stop bug
Fix the bug that WiFi stop causes esp_wifi_internal_reg_rxcb() fails.
2019-09-20 17:49:49 +08:00
liu zhifu b933d851bf esp32: fix WPS/WPA2-Enterprise memory leak
Fix WPS and WPA2-Enterprise memory leak bug.
2019-09-20 17:49:49 +08:00
liu zhifu 204b58a34c esp32: fix smartconfig crash when no AP is found
Fix the bug that smartconfig crashes when no AP is found during smartconfig scan.
2019-09-20 17:49:49 +08:00
Jiang Jiang Jian b12c2646fa Merge branch 'bugfix/fix_wifi_stack_can_freeze_v3.3' into 'release/v3.3'
esp_wifi: ESP32_WIFI_RX_BA_WIN should be less than ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM (v3.3)

See merge request espressif/esp-idf!5617
2019-09-08 23:11:57 +08:00
Jiang Jiang Jian 64fbce50c2 Merge branch 'bugfix/pm_isr_exit_lock_v3.3' into 'release/v3.3'
pm: prevent interrupt nesting during esp_pm_impl_isr_hook (backport v3.3)

See merge request espressif/esp-idf!4970
2019-09-08 23:10:02 +08:00
Angus Gratton 3201333f06 Merge branch 'bugfix/flash_encryption_disable_plaintext_v3.3' into 'release/v3.3'
flash encryption: Add config option to disable any plaintext reflashes (3.3)

See merge request espressif/esp-idf!5280
2019-09-05 08:00:39 +08:00
Angus Gratton 21a8a9a170 Merge branch 'bugfix/dis_interrupts_up_to_6_level_for_dport_wa_v3.3' into 'release/v3.3'
esp32: Dis interrupts up to 5 lvl for DPORT (v3.3)

See merge request espressif/esp-idf!5713
2019-09-03 13:34:54 +08:00
chenjianqiang cf2062f1d7 bugfix(flash): add flash config in app startup
We fixed some flash bugs in bootloader, but for the users used the old
vrsion bootloader, they can not fix these bugs via OTA, the solution is
add these updates in app startup.

These updates include:
1. SPI flash gpio matrix and drive strength configuration
2. SPI flash clock configuration
3. SPI flash read dummy configuration
4. SPI flash cs timing configuration
5. Update flash id of g_rom_flashchip
2019-08-27 21:04:36 +08:00
Konstantin Kondrashov 8fa409a0b5 esp32: Add UTs for DPORT and Hi-interrupt 2019-08-21 09:48:16 +00:00
Konstantin Kondrashov 2e9904556f esp32: Dis interrupts up to 5 lvl for DPORT
Disable interrupts for both DPORT workarounds up to 5 lvl.

Closes: https://esp32.com/viewtopic.php?f=2&t=10981&sid=d125cec233070ed4d2c5410bf5d3d74a
Closes: IDF-728
2019-08-21 09:48:16 +00:00
Jiang Jiang Jian 148a269808 Merge branch 'bugfix/improve_spi_timing_for_flash_v3.3' into 'release/v3.3'
bugfix(flash): improve spi cs timing settings for flash (backport v3.3)

See merge request espressif/esp-idf!5514
2019-08-20 16:33:57 +08:00
chenjianqiang 4cd7fd89f5 bugfix(flash): add spi dio address bitlen configure in psram init 2019-08-16 07:38:54 +00:00
suda-morris b482ba117d efuse: update the scheme of getting chip revision 2019-08-13 15:49:01 +08:00
Angus Gratton 3991084777 sha: Add fault injection checks reading hash digest state
Vulnerability reported by LimitedResults under Espressif Bug Bounty Program.
2019-08-11 13:18:23 +10:00
Angus Gratton 088439c634 aes: Add fault injection checks when writing key to hardware
Vulnerability reported by LimitedResults under Espressif Bug Bounty Program.
2019-08-11 13:18:23 +10:00
Angus Gratton 7c5dd19c83 hwcrypto: Add AES fault injection check
Hardware AES-CBC performance changes:

Release config 11.0MB/sec -> 10.8MB/sec
Debug config 9.4MB/sec -> 9.8MB/sec

(Unrolling the loop to optimize the check improves
performance at -Og, even with the fault check.)
2019-08-07 16:04:59 +10:00
Angus Gratton e8a4e70c42 flash encryption: Add config option to disable any plaintext reflashes
Enabled by default when Secure Boot is on, so Flash Encryption protection
is always available in case of a Secure Boot bypass.
2019-07-30 08:35:30 +00:00
xiehang b6e6a4f4b2 esp_wifi: ESP32_WIFI_RX_BA_WIN should be less than ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM 2019-07-25 14:37:20 +08:00
zhangyanjiao 2d7124e319 fix the watchdog bug during WiFi scan and BLE scan 2019-07-16 10:31:19 +08:00
chenjianqiang 232408981d bugfix(flash): improve spi cs timing settings for flash
cs setup time is recomemded to be 1.5T, and cs hold time is recommended to be 2.5T.
(cs_setup = 1, cs_setup_time = 0; cs_hold = 1, cs_hold_time = 1)
2019-07-15 14:45:35 +08:00
Jiang Jiang Jian 47ca5d53df Merge branch 'feature/config_spi_pins_based_on_efuse_value_v3.3' into 'release/v3.3'
feat(psram): config SPI psram pins based on efuse value (backport v3.3)

See merge request espressif/esp-idf!5240
2019-07-08 11:52:24 +08:00
Jiang Jiang Jian db38c37cf7 Merge branch 'mesh/bugfix_0628_v3.3' into 'release/v3.3'
mesh: bugfix (backport 3.3)

See merge request espressif/esp-idf!5438
2019-07-05 22:33:24 +08:00
qiyuexia f4ee20165e mesh: bugfix
1. resend eb which are pending in g_ic.tx_buf due to channel switch.
2. add lock for mgmg/xon/bcast to protect send from user flush.
3. softap: add check if secondary offset is correct when start softap.
4. softap: in inactive timer handler, add check if child bss is removed to avoid removing it again.
5. disable A-MPDU for non-root.
6. fix reusing a freed eb.
7. fix when node becomes root, it does not record assoc value to nvs.
8. discard unnecessary forwarded group packets.
9. fix toDS state is not updated in time.
10. fix s_sta_cnx_times is not cleared when deinit causes root sends ADD annoucement.
11. root: increase beacon timeout time from 6 seconds to 15 seconds to delay initiation of reconnection.
12. add esp_mesh_get_tsf_time to return TSF time.
13. send the whole routing table multi-times.
14. clear candidate settings if not receive candidate beacon within 8 seconds.
2019-07-03 14:35:57 +08:00
chenjianqiang a6f990ffb9 bugfix(flash): improve flash dio read timing
When flash work in DIO Mode, in order to ensure the fast read mode of flash
is a fixed value, we merged the mode bits into address part, and the fast
read mode value is 0 (the default value).
2019-07-02 14:25:27 +08:00
chenjianqiang 43561a40d2 bugfix(psram): make sure the psram_io struct is initialized and make unknown psram package version more obvious 2019-07-02 14:15:55 +08:00
chenjianqiang 55f5c2e08d feat(psram): config SPI psram pins based on efuse value 2019-07-02 14:15:55 +08:00
Sachin Parekh f73c972280 power_management: port*_CRITICAL vanilla FreeRTOS compliance
Signed-off-by: Sachin Parekh <sachin.parekh@espressif.com>
2019-06-25 04:33:32 +00:00