Commit graph

5301 commits

Author SHA1 Message Date
zhiweijian 77668b3912 Component/bt: add scan window and interval check when set scan params 2018-11-06 08:45:25 +00:00
Ivan Grokhotkov 28f1e1597b Merge branch 'bugfix/tickless_idle_single_core' into 'master'
freertos, pm: fix tickless idle not entered in single core mode

See merge request idf/esp-idf!3584
2018-11-06 12:15:03 +08:00
Ivan Grokhotkov 35d1c7b173 Merge branch 'bugfix/freertos_idle_tick_count' into 'master'
freertos: use xTaskQueueMutex to protect tick count

See merge request idf/esp-idf!3478
2018-11-06 12:14:51 +08:00
Ivan Grokhotkov ddfd62ee66 Merge branch 'bugfix/register_map_LAN8720' into 'master'
ethernet: fix some bugs in Ethernet driver

See merge request idf/esp-idf!3490
2018-11-06 12:13:47 +08:00
Jiang Jiang Jian ded53bd0ff Merge branch 'bugfix/btdm_allow_a2dp_codec_dynamic_alloc' into 'master'
bugfix/btdm_allow_a2dp_codec_dynamic_allocated

See merge request idf/esp-idf!3598
2018-11-06 11:56:30 +08:00
morris b6d7675e60 ethernet: fix some bugs in phy&mac driver
1. Original register mapping for LAN8720 has some registers that doesn't exist/support.
So just remove them, and fix the power and init function for LAN8720.
2. GPIO16 and GPIO17 is occupied by PSRAM, so only ETH_CLOCK_GPIO_IN mode is supported in that case if using PSRAM.
3. Fix bug of OTA failing with Ethernet
4. Fix bug of multicast with Ethernet

Closes https://github.com/espressif/esp-idf/issues/2564
Closes https://github.com/espressif/esp-idf/issues/2620
Closes https://github.com/espressif/esp-idf/issues/2657
2018-11-06 11:07:22 +08:00
Ivan Grokhotkov 364f033a49 Merge branch 'feature/vfs_utime' into 'master'
VFS: Implement utime() for FATFS and SPIFFS

See merge request idf/esp-idf!3610
2018-11-06 10:47:02 +08:00
Ivan Grokhotkov 761d44bd36 Merge branch 'bugfix/xts_compile_err' into 'master'
mbedtls: Fix compilation errors when CONFIG_MBEDTLS_HARDWARE_AES is disabled

See merge request idf/esp-idf!3506
2018-11-05 16:58:38 +08:00
Roland Dobai fb334baa7c VFS: Implement utime() 2018-11-05 09:54:01 +01:00
Ivan Grokhotkov ada3bc3fb5 Merge branch 'bugfix/aes_sha_mpi_shared_regs' into 'master'
aes/sha/mpi: Bugfix a use of shared registers.

See merge request idf/esp-idf!3580
2018-11-05 16:31:03 +08:00
Ivan Grokhotkov 13046e7625 Merge branch 'bugfix/esp-tls-doc' into 'master'
esp-tls: Fix documentaion issue in esp_tls_conn_new_async API

See merge request idf/esp-idf!3545
2018-11-05 12:30:22 +08:00
Ivan Grokhotkov ee0dea3d0d Merge branch 'bugfix/esp_http_client_async_crash' into 'master'
esp_http_client: Fix crash in async mode

See merge request idf/esp-idf!3551
2018-11-05 12:30:04 +08:00
Konstantin Kondrashov 8bba348528 aes/sha/mpi: Bugfix a use of shared registers.
This commit resolves a blocking in esp_aes_block function.

Introduce:
The problem was in the fact that AES is switched off at the moment when he should give out the processed data. But because of the disabled, the operation can not be completed successfully, there is an infinite hang. The reason for this behavior is that the registers for controlling the inclusion of AES, SHA, MPI have shared registers and they were not protected from sharing.

Fix some related issue with shared using of AES SHA RSA accelerators.

Closes: https://github.com/espressif/esp-idf/issues/2295#issuecomment-432898137
2018-11-05 04:22:47 +00:00
Ivan Grokhotkov fb7ba1baa0 Merge branch 'bugfix/unit_test_adjtime' into 'master'
Resolve ""test for thread safety adjtime and gettimeofday functions" fails randomly"

Closes #37

See merge request idf/esp-idf!3613
2018-11-05 12:20:07 +08:00
Ivan Grokhotkov 0716e65955 pm: prevent entering light sleep again immediately after wakeup
When light sleep is finished on one CPU, it is possible that the other
CPU will enter light sleep again very soon, before interrupts on the
first CPU get a chance to run. To avoid such situation, set a flag
for the other CPU to skip light sleep attempt.
2018-11-05 12:18:29 +08:00
Ivan Grokhotkov 22dd3103bd pm: fix entering light sleep in single core mode
Tickless idle/light sleep procedure had a bug in single core mode.
Consider the flow of events:
1. Idle task runs and calls vApplicationIdleHook
2. This calls esp_vApplicationIdleHook, which calls esp_pm_impl_idle_hook, and pm lock for RTOS on the current core is released.
3. Then esp_vApplicationIdleHook calls esp_pm_impl_waiti, which checks that s_entered_light_sleep[core_id]==false and goes into waiti state.
4. Some interrupt happens, calls esp_pm_impl_isr_hook, which takes pm lock for RTOS. PM state goes back to CPU_FREQ_MAX.
5. Once the interrupt is over, vApplicationIdleHook returns, and Idle task continues to run, finally reaching the call to vApplicationSleep.
6. vApplicationSleep does not enter light sleep, because esp_pm_impl_isr_hook has already changed PM state from IDLE to CPU_FREQ_MAX.

This didn’t happen in dual core mode, because waiti state of one CPU was interrupted by CCOMPARE update interrupt from the other CPU, in which case PM lock for FreeRTOS was not taken.

Fix by inverting the meaning of the flag (for convenience) and only setting it to true when vApplicationSleep actually fails to enter light sleep.
2018-11-05 12:18:29 +08:00
Ivan Grokhotkov ae08bdcc31 freertos: fix compilation warning in single core mode
When tickless idle is enabled
2018-11-05 12:18:29 +08:00
Ivan Grokhotkov b7841ec313 freertos: use xTaskQueueMutex to protect tick count
Having two different spinlocks is problematic due to possibly
different order in which the locks will be taken. Changing the order
would require significant restructuring of kernel code which is
undesirable.

An additional place where taking xTickCountMutex was needed was in
vApplicationSleep function. Not taking xTickCountMutex resulted in
other CPU sometimes possibly advancing tick count while light sleep
entry/exit was happening. Taking xTickCountMutex in addition to
xTaskQueueMutex has shown a problem that in different code paths,
these two spinlocks could be taken in different order, leading to
(unlikely, but possible) deadlocks.
2018-11-05 03:08:26 +00:00
He Yin Ling 242724bbe9 Merge branch 'test/fix_bug_of_scan_interval_and_windows' into 'master'
test: fix bug of scan interval and window

See merge request idf/esp-idf!3606
2018-11-05 11:00:58 +08:00
Jiang Jiang Jian 930da8fd31 Merge branch 'bugfix/iperf_bt_error_when_wifi_connect' into 'master'
components/bt: Point ACL RX buffer ptr to ACL RX buffer if ACL RX buffer ptr is null

See merge request idf/esp-idf!3536
2018-11-02 16:12:31 +08:00
Ivan Grokhotkov 7d465a5487 Merge branch 'bugfix/event_perf_test_psram' into 'master'
esp_event: lower test performance threshold for PSRAM config

Closes #34

See merge request idf/esp-idf!3603
2018-11-02 14:12:17 +08:00
Konstantin Kondrashov 84f1eb5eac newlib: Fix UT adjtime 2018-11-01 20:34:39 +08:00
baohongde f2309f1013 components/bt: Point ACL RX buffer ptr to ACL RX buffer if ACL RX buffer ptr is null
1. When WIFI task or other high priority task blocks the Bluetooth task, ACL RX buffer will use up, ACL RX buffer ptr will point to null and will never point to a valid adress. Causing errors in Bluetooth.
2. hcimsgs.h used whether flow control is on or off
2018-11-01 17:33:44 +08:00
Jiang Jiang Jian 12b2268ee5 Merge branch 'bugfix/btdm_sniff_anchor_point_calculation_error' into 'master'
bugfix/btdm_sniff_anchor_point_calculation_error

See merge request idf/esp-idf!3582
2018-11-01 15:58:00 +08:00
Jiang Jiang Jian a60a71ff07 Merge branch 'bugfix/btdm_name_buffer_allocation_size_differs' into 'master'
components/bt: Fix the different size of name buffer allocation size

See merge request idf/esp-idf!3587
2018-11-01 15:56:45 +08:00
Jiang Jiang Jian cac7b951a8 Merge branch 'bugfix/btdm_fix_get_attr_value_error' into 'master'
Component/bt: fix get attr value API error

See merge request idf/esp-idf!3583
2018-11-01 15:55:22 +08:00
Jiang Jiang Jian b601fcfde0 Merge branch 'bugfix/btdm_fix_ble_cannt_send_or_receive_packet_sometimes' into 'master'
Component/bt: fix ble cannot send or receive packet sometimes

See merge request idf/esp-idf!3585
2018-11-01 15:55:05 +08:00
Sagar Bijwe fbcc160675 mbedtls: Fix compilation errors when CONFIG_MBEDTLS_HARDWARE_AES is disabled 2018-11-01 12:08:45 +05:30
Ivan Grokhotkov d98d1ef1c2 Merge branch 'bugfix/bootloader_iram_overlap_check' into 'master'
bootloader: verify that loaded image does not overlap bootloader code

See merge request idf/esp-idf!3409
2018-11-01 13:56:43 +08:00
Ivan Grokhotkov d28c99d36c esp_event: lower test performance threshold for PSRAM config 2018-11-01 13:50:08 +08:00
Ivan Grokhotkov cd38970ef9 Merge branch 'bugfix/wl_version_update' into 'master'
Version update from V1 to V2 now done in correct way.

See merge request idf/esp-idf!3557
2018-11-01 12:50:49 +08:00
chensheng d336f1513f test: fix bug of scan interval and window 2018-11-01 11:54:52 +08:00
baohongde 373f1c121b component/bt: bugfix of error when entering sniff mode with attempt large than 0xFF 2018-10-31 16:16:49 +00:00
wangmengyang 159d4ac742 component/bt: bugfix for the error in calculation sniff anchor point which can result in supervision timeout after connection is brought into sniff mode 2018-10-31 16:16:49 +00:00
zhiweijian 1716d12547 Component/bt: fix ble cannot send or receive packet sometimes 2018-10-31 16:13:51 +00:00
wangmengyang 7bb83b0056 component/bt: allow dynamic allocation of SBC encoder/decoder buffer used in A2DP to save internal DRAM 2018-10-31 16:11:49 +00:00
Ivan Grokhotkov a4357aed91 Merge branch 'fix/spi_test_memory_layout' into 'master'
test: fix the unit test fail issue under single_core config

See merge request idf/esp-idf!3596
2018-10-31 21:37:56 +08:00
Jiang Jiang Jian dba29eeb2e Merge branch 'bugfix/btdm_change_default_CoD_of_BT_profile' into 'master'
components/bt: Set default Class of Device of BT profile

See merge request idf/esp-idf!3564
2018-10-31 20:51:15 +08:00
baohongde e19a352a2b components/bt: Fix the different size of name buffer allocation size
Close https://github.com/espressif/esp-idf/issues/2615
2018-10-31 17:39:31 +08:00
Jiang Jiang Jian 39c03558e8 Merge branch 'bugfix/btdm_add_attr_handle_for_ESP_GATTS_CONF_EVT' into 'master'
Component/bt: add attr_handle for ESP_GATTS_CONF_EVT

See merge request idf/esp-idf!3492
2018-10-31 17:20:47 +08:00
Michael (XIAO Xufeng) 4132834faa test: fix the unit test fail issue under single_core config
Introduced in 97e3542947.

The previous commit frees the IRAM part when single core, but doesn't
change the memory layout functions. The unit test mallocs IRAM memory
from the heap, accidently into the new-released region, which doesn't
match the memory layout function.

This commit update the memory layout function to fix this.
2018-10-31 17:04:32 +08:00
Angus Gratton e4369aaed4 Merge branch 'feature/mqtt_mutual_auth' into 'master'
MQTT: Added client cert ssl example per PR from GitHub

See merge request idf/esp-idf!3473
2018-10-31 07:06:58 +08:00
Jitin George 3551b84c3a esp_http_client: Fix crash in async mode
Closes https://github.com/espressif/esp-idf/issues/2624
2018-10-30 09:58:57 +00:00
Jiang Jiang Jian 97e3542947 Merge branch 'bugfix/release_some_memory_on_single_core_mode' into 'master'
release memory not used in single core mode

See merge request idf/esp-idf!2733
2018-10-30 15:53:31 +08:00
Jiang Jiang Jian f6dd3520c4 Merge branch 'bugfix/assert_when_do_wps_with_mikrotik' into 'master'
wifi: bugfix of assert when do wps with mikrotik

See merge request idf/esp-idf!3572
2018-10-30 15:52:02 +08:00
Jiang Jiang Jian d335bdcf71 Merge branch 'bugfix/btdm_reduce_iram_size' into 'master'
components/bt: Reduce IRAM size

See merge request idf/esp-idf!3574
2018-10-30 15:17:06 +08:00
David Cermak 0cdb33c9dd mqtt: ssl mutual authentication example added per PR from github, corrected cmake build, updated per idf style
Merges https://github.com/espressif/esp-idf/pull/2490
2018-10-30 08:04:09 +01:00
Riccardo Binetti 9ce8e1e5a1 transport_ssl: add support for mutual SSL authentication
Signed-off-by: David Cermak <cermak@espressif.com>
2018-10-30 08:04:09 +01:00
Riccardo Binetti dec70a7601 esp-tls: add support for mutual SSL authentication
Signed-off-by: David Cermak <cermak@espressif.com>
2018-10-30 08:04:09 +01:00
zhiweijian 950fe25120 Component/bt: fix get attr value API error 2018-10-30 15:00:23 +08:00