Commit graph

3105 commits

Author SHA1 Message Date
Tian Zhong Xing 55e95b04bd bugfix: add netif info in event message when got ipv6 address 2017-10-23 13:50:43 +08:00
Ivan Grokhotkov 91d9cb98d3 Merge branch 'bugfix/unit_tests_build' into 'master'
spi_flash: fix build error with profiling enabled

See merge request !1437
2017-10-23 12:14:10 +08:00
Angus Gratton 454e47385c Merge branch 'bugfix/select_fdset' into 'master'
LWIP: Fix select() FD_SET/FD_GET/etc

See merge request !1435
2017-10-23 10:55:33 +08:00
Angus Gratton 01befe4d6a Merge branch 'bugfix/i2c_hw_fsm_recover' into 'master'
bugfix(i2c): add I2C hardware reset if the hw FSM get stuck

See merge request !1272
2017-10-23 10:16:02 +08:00
Ivan Grokhotkov fbd52dcf34 spi_flash: fix build error with profiling enabled 2017-10-22 12:57:56 +08:00
Ivan Grokhotkov f039aac1e5 Merge branch 'bugfix/i2s_bck_polariy' into 'master'
bugfix(i2s): fix bck polarity issue when using pll clock.

See merge request !1428
2017-10-22 12:36:27 +08:00
Ivan Grokhotkov 000a4f5941 Merge branch 'bugfix/rmt_thresh_check' into 'master'
bugfix(rmt): fix event thresh check issue

See merge request !1423
2017-10-22 12:35:44 +08:00
Ivan Grokhotkov 59b7d98fec Merge branch 'feature/dfs' into 'master'
Dynamic frequency scaling

See merge request !1189
2017-10-22 12:34:11 +08:00
Wangjialin ed1e32f583 bugfix(i2c): add I2C hardware reset if the hw FSM get stuck
Reported from different sources from github or bbs:

https://github.com/espressif/esp-idf/issues/680

https://github.com/espressif/esp-idf/issues/922

We tested reading several sensor or other I2C slave devices, if the power and SDA/SCL wires are in proper condition, everything works find with reading the slave.
If we remove the power supply for the slave during I2C is reading, or directly connect SDA or SCL to ground, this would  cause the I2C FSM get stuck in wrong state, all we can do is the reset the I2C hardware in this case.
After this commit, no matter whether the power supply of I2C slave is removed or SDA / SCL are shorted to ground, the driver can recover from wrong state.

We are not sure whether this the save issue with the reported one yet, but to make the driver more robust.

Further information:

1. For I2C master mode, we have tested different situations, e.g., to short the SDA/SCL directly to GND/VCC, to short the SDA to SCL, to un-plug the slave device, to power off the slave device. Under all of those situations, this version of driver can recover and keep working.
2. Some slave device will die by accident and keep the SDA in low level, in this case, master should send several clock to make the slave release the bus.
3. Slave mode of ESP32 might also get in wrong state that held the SDA low, in this case, master device could send a stop signal to make esp32 slave release the bus.

Modifications:

1. Disable I2C_MASTER_TRAN_COMP interrupt to void extra interrupt.
2. Disable un-used timeout interrupt for slave.
3. Add bus reset if error detected for master mode.
4. Add bus clear if SDA level is low when error detected.
5. Modify the argument type of i2c_set_pin.
6. add API to set timeout value
7. add parameter check for timing APIs
2017-10-21 02:10:59 +08:00
Angus Gratton f76a3c45c0 newlib: Disable sys/types.h implementations of FD_SET, etc.
Temporary measure, until we have VFS-level select() support.

Closes https://github.com/espressif/esp-idf/issues/1141
2017-10-20 18:11:32 +08:00
Angus Gratton e5ae0f5927 lwip: Make LWIP_SOCKET_OFFSET signed, remove need for underflow check
This reverts commit 541493d877.
2017-10-20 18:04:28 +08:00
Angus Gratton 22756b6c02 Merge branch 'feature/FreeRTOS_Trace_Facilities' into 'master'
feature/make freertos trace facility configurable

See merge request !1420
2017-10-20 16:42:15 +08:00
Ivan Grokhotkov b6f37bda97 Merge branch 'feature/i2s_built_in_adc' into 'master'
feature(I2S-ADC): add ADC mode for I2S.

See merge request !1077
2017-10-20 15:52:56 +08:00
Darian Leung a6854b72cd freertos/make trace facility configurable
This commit makes configUSE_TRACE_FACILITY and
configUSE_STATS_FORMATTING_FUNCTIONS configurable in kconfig. Test cases fro the
functions enabled by the two configurations above have also been added.

Test cases for the following functions have been added...

- uxTaskGetSystemState()
- uxTaskGetTaskNumber()
- vTaskSetTaskNumber()

- xEventGroupClearBitsFromISR()
- xEventGroupSetBitsFromISR()
- uxEventGroupGetNumber()

- uxQueueGetQueueNumber()
- vQueueSetQueueNumber()
- ucQueueGetQueueType()

Test cases for the following functions were not required...

- prvListTaskWithinSingleList()
- prvWriteNameToBuffer()
- vTaskList()
2017-10-20 15:17:17 +08:00
Angus Gratton 477ed8ce62 Merge branch 'bugfix/touchpad_dac_mismatch_on_tp8_tp9' into 'master'
bugfix(touch): add workaround for touch pad DAC hardware source mismatch on tp8 and tp9.

See merge request !1288
2017-10-20 14:18:32 +08:00
Ivan Grokhotkov dbebece1d2 Merge branch 'feature/unit-test-configs' into 'master'
unit-test-app: add support for testing multiple configurations

See merge request !1249
2017-10-20 14:03:53 +08:00
Angus Gratton b30c0d1bbb Merge branch 'feature/add_dns_api' into 'master'
tcpip_adapter/lwip: add dns api

See merge request !1405
2017-10-20 11:54:20 +08:00
Angus Gratton 47aaf402b8 heap: Add heap_caps_dump() / heap_caps_dump_all() functions
Dump the structure of the heap for debugging purposes.
2017-10-20 11:38:24 +08:00
Angus Gratton b10e1a92b6 freertos: Update comments in "port" section (portMUX/etc)
Some comments had fallen out of date.
2017-10-20 11:17:44 +08:00
Wangjialin a84db78eb1 bugfix(i2s): fix bck polarity issue when using pll clock.
reported from github: https://github.com/espressif/esp-idf/issues/1119

Digital team think it is due to the decimal divider.
We can reset the i2s tx and rx when calling i2s_stop to avoid this.
2017-10-19 23:23:01 +08:00
Ivan Grokhotkov 90bbcbcdc0 unit tests: fix warnings, build with -Werror
- libsodium: silence warnings
- unit tests: fix warnings
- spiram: fix warnings
- ringbuf test: enable by default, reduce delays
2017-10-19 21:35:23 +08:00
Ivan Grokhotkov b52e3fae64 build system: fix warning about undefined variable 'quote' 2017-10-19 21:35:23 +08:00
Ivan Grokhotkov ae7404972c sleep: don't power down VDD_SDIO in light sleep if SPIRAM is enabled 2017-10-19 21:35:23 +08:00
Ivan Grokhotkov d55ddfe56d update libstdc++.a built with pSRAM workaround 2017-10-19 21:35:22 +08:00
Ivan Grokhotkov 8990549e89 spi_flash: fix spi_flash_read into buffer in external RAM, add test 2017-10-19 21:35:21 +08:00
Ivan Grokhotkov 099565635b soc: correct values of SOC_BYTE_ACCESSIBLE_LOW, SOC_MEM_INTERNAL_LOW
Internal byte accessible memory starts with Internal ROM 1 at 0x3FF90000.
Region of RTC fast memory starting at 0x3FF80000 is not used in IDF as
it is mapped to PRO CPU only.
2017-10-19 21:35:21 +08:00
Ivan Grokhotkov ee99bdfbad spi_flash_cache_enabled: report correct result in single core mode 2017-10-19 21:35:21 +08:00
Ivan Grokhotkov cc67500d3e unit test: adapt tests to single core configuration 2017-10-19 21:35:21 +08:00
He Yin Ling 1fc2ac8b09 unit-test: esp timer use same name as ets timer
We will use case name to select test cases in UT jobs.
Same case name is not allowed.
2017-10-19 21:35:21 +08:00
Ivan Grokhotkov 6cc8099610 Merge branch 'bugfix/malloc_failure' into 'master'
heap: Fix race condition causing malloc() to fail under some conditions

See merge request !1424
2017-10-19 21:30:26 +08:00
Ivan Grokhotkov c360f8dece Merge branch 'bugfix/heap_check_integrity' into 'master'
heap: Fix spurious heap_caps_check_integrity() errors in Comprehensive mode

See merge request !1421
2017-10-19 21:30:16 +08:00
Liu Zhi Fu cf7ae8135b tcpip_adapter/lwip: make dhcp domain name server option configurable
Add api to configure dhcp option: domain name server

1.closes https://github.com/espressif/esp-idf/issues/162

2.closes https://github.com/espressif/esp-idf/issues/705
2017-10-19 19:28:00 +08:00
Angus Gratton b0c5665f15 heap: Fix race condition causing malloc() to fail under some conditions
During a call to multi_heap_malloc(), if both these conditions were true:
- That heap only has one block large enough for the allocation
  (this is always the case if the heap is unfragmented).
- Another allocation is simultaneously occurring in the same heap.

... multi_heap_malloc() could incorrectly return NULL.

This caused IDF heap_caps_malloc() and malloc() to also fail, particularly
often if only one or two heaps had space for the allocation (otherwise
heap_caps_malloc() fails over to the next heap).
2017-10-19 16:05:00 +08:00
Ivan Grokhotkov 8e01b4aef8 Merge branch 'docs/esp32_hooks' into 'master'
docs/Added documentation about esp32 hooks

See merge request !1417
2017-10-19 12:32:36 +08:00
Wangjialin ab1abff080 bugfix(rmt): fix event thresh check issue
reported from: https://github.com/espressif/esp-idf/issues/1011

1. Fix event thresh check issue
2. Change IO number in example in case it conflicts with GPIO16(psram cs pin).
2017-10-18 18:49:09 +08:00
Ivan Grokhotkov 54d2dc7681 Merge branch 'bugfix/fix_some_wifi_bugs' into 'master'
esp32: fix some wifi bugs

See merge request !1414
2017-10-18 16:20:09 +08:00
Angus Gratton 04188d8ec7 heap: Fix spurious heap_caps_check_integrity() errors in Comprehensive mode
Heap was not being locked before poisoning, so heap_caps_check_integrity()
would sometimes race with checking the poison bytes and print unnecessary
errors.

Details: https://esp32.com/viewtopic.php?f=2&t=3348&p=15732#p15732
2017-10-18 15:57:52 +08:00
Darian Leung 461f8da704 docs/Added documentation about esp32 hooks
This commit adds documentation about the esp32 Idle and Tick Hooks
2017-10-18 15:19:35 +08:00
Angus Gratton 78f70d4e79 Merge branch 'bugfix/cxx_exceptions' into 'master'
Full C++ Exception Support option (& reclaim memory when exceptions disabled)

See merge request !1353
2017-10-18 15:08:10 +08:00
Deng Xin 80b14fc77f esp32: fix some wifi bugs
1. Fix WiFi timer enable twice issue
2. Fix a softAP compatibility issue
3. Fix ebuf alloc counter issue
4. remove nvs_flash_init() in esp_wifi_init()
5. Fix scan only find few APs after set bssid
6. Fix can not connect to hidden SoftAP
7. Remove group key entry before connecting ot AP
2017-10-18 14:53:19 +08:00
Ivan Grokhotkov d503b991b4 bt: lock APB frequency while BT controller is enabled 2017-10-18 14:37:22 +08:00
Ivan Grokhotkov 373d85dd9f freertos: fix error when including xtensa-timer.h from other components 2017-10-18 14:37:22 +08:00
Ivan Grokhotkov 266d2b3e4f ethernet: lock APB frequency while ethernet is enabled 2017-10-18 14:37:22 +08:00
Ivan Grokhotkov 5048d38ce7 spi slave: lock APB frequency while driver is in use 2017-10-18 14:37:21 +08:00
Ivan Grokhotkov e4616588b7 spi master: lock APB frequency while in transaction 2017-10-18 14:19:21 +08:00
Ivan Grokhotkov 330b6bd668 sdmmc: lock APB frequency while in transaction 2017-10-18 14:19:20 +08:00
Ivan Grokhotkov c2fff997ea sysview: always use TG as timestamp source 2017-10-18 14:19:20 +08:00
Ivan Grokhotkov fba9678c56 uart: add support for REF_TICK 2017-10-18 14:19:20 +08:00
Ivan Grokhotkov bfeecd2b56 freertos: deprecate XT_CLOCK_FREQ
- freertos: add deprecated definition for XT_CLOCK_FREQ
- flash_ops: don't use XT_CLOCK_FREQ
- unity: don't use XT_CLOCK_FREQ
- hw_random: don't use XT_CLOCK_FREQ
- core_dump: don't use XT_CLOCK_FREQ
- app_trace: don't use XT_CLOCK_FREQ
- xtensa_init: init xt_tick_divisor
2017-10-18 14:19:19 +08:00
Ivan Grokhotkov df3c857a30 esp32: add power management hooks for WiFi library 2017-10-18 14:19:19 +08:00
Ivan Grokhotkov eb0c34e5c9 esp_timer: add support for frequency scaling 2017-10-18 14:19:18 +08:00
Ivan Grokhotkov 3f818f4862 pm: support for tracing using GPIOs 2017-10-18 14:19:18 +08:00
Ivan Grokhotkov 535695f0b9 freertos: add frequency switching hooks to ISR and idle task 2017-10-18 14:19:17 +08:00
Ivan Grokhotkov 42d51a4224 esp32: initialize PM at startup, add Kconfig options 2017-10-18 14:19:17 +08:00
Ivan Grokhotkov 68e1751b78 pm: initial implementation for ESP32 2017-10-18 14:19:16 +08:00
Ivan Grokhotkov 47e3c9dd4b pm: initial version of power management APIs 2017-10-18 14:19:16 +08:00
Ivan Grokhotkov 4798b7d775 unit tests: add test to dump esp_timer stats 2017-10-18 14:19:15 +08:00
Ivan Grokhotkov 3788b35f87 unit tests: more robust esp_timer test 2017-10-18 14:19:15 +08:00
Ivan Grokhotkov b03e08dc4e soc/rtc: add function to convert CPU frequency in MHz to rtc_cpu_freq_t 2017-10-18 14:19:15 +08:00
Ivan Grokhotkov a242ae6d0b soc/rtc: add fast paths for switching between PLL and XTAL 2017-10-18 14:19:14 +08:00
Ivan Grokhotkov 37e9bc715c esp_clk.h: make public, add getters for RTC time, CPU/APB freq 2017-10-18 14:19:14 +08:00
Ivan Grokhotkov f13623d97d make esp_timer.h public 2017-10-18 12:31:38 +08:00
Ivan Grokhotkov 566f018996 crosscore_int: add support for FREQ_SWITCH event 2017-10-18 12:31:38 +08:00
Ivan Grokhotkov 2e8441df9e Merge branch 'feature/fsync' into 'master'
vfs,fat: add fsync to VFS interface, implement it for fatfs

See merge request !1412
2017-10-18 07:17:56 +08:00
Tian Hao 09862b5918 component/esp32 : update phy & rtc
RTC V230
add BT AGC saturation protection, replace RTC V229.

PHY V362
Power up print: "phy_version: 362.0, 61e8d92, Sep 8 2017, 18:48:13"
1. esp_init_data_v3.bin
modify TX target power
modify WIFI & BT RX gain table
2. modify phy_close_rf()
3. add phy_set_most_tpw()
4. 26M crystal work OK
5. noise_check_loop ok
2017-10-17 18:02:42 +08:00
Ivan Grokhotkov 6b8c8bf638 Merge branch 'bugfix/slave_dma_claim' into 'master'
fix(spi_slave): enable DMA clock when initialization.

See merge request !1385
2017-10-17 17:41:39 +08:00
Ivan Grokhotkov 7babc74fce Merge branch 'feature/reduce_min_num_of_wifi_static_tx_buffer' into 'master'
Reduce minimum number of WiFi static tx buffer

See merge request !1398
2017-10-17 17:40:14 +08:00
Angus Gratton 3f4c8f7174 pthreads local storage: add test for unique keys 2017-10-17 15:29:25 +08:00
Angus Gratton 69e92ee320 unit tests: If heap tracing is enabled in sdkconfig, leak trace each test 2017-10-17 15:29:25 +08:00
Angus Gratton 9c7477ef34 cxx: Add KConfig option for C++ exceptions, disable by default
Fixes https://github.com/espressif/esp-idf/issues/1072

(Additional 20KB is still used if C++ exception support is enabled in
menuconfig.)
2017-10-17 15:29:25 +08:00
Ivan Grokhotkov 502c3d0243 vfs,fat: add fsync to VFS interface, implement it for fatfs 2017-10-17 15:14:53 +08:00
Angus Gratton a231ba22f3 cxx: Add a sanity check for C++ exception support 2017-10-17 14:46:08 +08:00
Angus Gratton 86c89ff169 pthread: Add support for pthread thread local storage
Refactors LWIP to use this for the LWIP thread local semaphore
2017-10-17 14:46:08 +08:00
Angus Gratton 3234064b6a freertos: Idle task shouldn't hold xTaskQueueMutex while calling TLS destructors
If the callbacks use any blocking call (ie printf), this can otherwise trigger a deadlock.
2017-10-17 14:31:58 +08:00
Angus Gratton 2ccc2ec5ee cxx tests: Fix race condition w/ leak checker when tearing down test tasks 2017-10-17 14:31:58 +08:00
Angus Gratton 90bf40587e Merge branch 'feature/sockets_files_shared_fd_space' into 'master'
lwip & vfs: POSIX I/O functions operate on sockets and files (first stage, no select() yet)

See merge request !1352
2017-10-17 14:17:09 +08:00
Ivan Grokhotkov 6e7dd5962b Merge branch 'bugfix/add_mutex_for_dual_core_hooks' into 'master'
freertos/Add mutex for dual core hooks

See merge request !1406
2017-10-17 14:15:09 +08:00
Ivan Grokhotkov 08d6ca4f70 Merge branch 'bugfix/ets_timer_iram' into 'master'
wifi/bt coexistence: Fix disabled cache access race when writing to flash

See merge request !1409
2017-10-17 14:12:43 +08:00
Gabriel Carstoiu 8128bb95ef fix(spi_slave): enable DMA clock when initialization.
merging in the code updates to the SPI master code done in commit b834fcf78a.

TW#15670, Closes #1027
2017-10-17 12:20:40 +08:00
michael 88f602a0e0 fix(periph_ctrl): fix reset function in periph_ctrl.c 2017-10-17 12:20:40 +08:00
michael 8e31a36562 feat(spi_slave): append trans_len field in trans_desc to show length actually transferred. 2017-10-17 12:01:12 +08:00
Ivan Grokhotkov d3bb9de36a Merge branch 'feature/spiram_init_in_app' into 'master'
spiram: expose function to initialize SPI RAM cache

See merge request !1281
2017-10-17 04:56:35 +08:00
Ivan Grokhotkov b58e19f8a2 Merge branch 'bugfix/soc_component_rodata' into 'master'
soc: place constant data from rtc_clk.c into DRAM

See merge request !1321
2017-10-17 04:54:43 +08:00
Ivan Grokhotkov edb212986f Merge branch 'bugfix/sd_card_fixes' into 'master'
SD card fixes

See merge request !1393
2017-10-17 04:45:24 +08:00
Ivan Grokhotkov 2bba4a77c4 Merge branch 'bugfix/console_empty_command' into 'master'
console: handle empty input to esp_console_run correctly

See merge request !1390
2017-10-17 04:44:19 +08:00
Ivan Grokhotkov 468d90762a Merge branch 'bugfix/freertos_portmux_debug' into 'master'
freertos: fix compilation errors with portMUX debugging enabled

See merge request !1392
2017-10-17 04:44:04 +08:00
Ivan Grokhotkov a638871aa5 Merge branch 'bugfix/nvs_init_partition' into 'master'
nvs: fix nvs_flash_init_partition initializing default partition

See merge request !1391
2017-10-17 04:43:54 +08:00
Angus Gratton 094cf4d79d wifi/bt coexistence: Fix disabled cache access race when writing to flash
Moves the ets_timer_arm() / ets_timer_disarm() code paths to RAM

Overhead is 740 bytes of IRAM, 0 bytes DRAM

(For comparison: If all of esp_timer.c is moved to RAM, overhead is 1068 bytes IRAM and 480 bytes DRAM.)
2017-10-16 19:47:33 +08:00
Jiang Jiang Jian 99f2996779 Merge branch 'bugfix/tw15595_eth_got_ip_log_error' into 'master'
esp32/tcpipadapter: correct eth ip got event info

See merge request !1388
2017-10-16 17:30:14 +08:00
Jiang Jiang Jian 50c993a1b2 Merge branch 'feature/some_refactor_for_esp_ping' into 'master'
lwip: refactor to socket ping

See merge request !875
2017-10-16 17:30:00 +08:00
Yulong 4b1968f315 component/bt: Change the queue_data->p_attr->p_value->attr_val.attr_len += queue_data->len code to the if case. 2017-10-16 03:42:49 -04:00
Darian Leung 7584f89278 esp32/Add mutex for dual core hooks
This commit adds critical sections for the dual core hooks
2017-10-16 11:47:38 +08:00
Angus Gratton 539262b5c2 vfs: Remove fd_offset member
This was intended for integrating LWIP, but a different approach was used.
2017-10-16 09:45:50 +08:00
Angus Gratton 4a9d4587b7 vfs: Add C++ guards to esp_vfs_dev.h
Closes https://github.com/espressif/esp-idf/issues/1069
2017-10-16 09:45:50 +08:00
Angus Gratton 541493d877 lwip: Check for underflow in FD_SET()/FD_GET()
select() only works with LWIP sockets which have a high LWIP_SOCKET_OFFSET,
so chance of accidental underflow is high.
2017-10-16 09:45:50 +08:00
Angus Gratton 3f83914f7a lwip: Fix bug with LWIP_SOCKET_OFFSET & IGMP group support 2017-10-16 09:45:50 +08:00
Angus Gratton 48d9d507aa newlib: Remove fcntl() implementation from libc
Allows fcntl() implementation in vfs to be used.

Closes https://github.com/espressif/esp-idf/issues/1070

Note this is different to the other libc file-related syscalls, as there is no
reent structure involved.
2017-10-16 09:45:50 +08:00
Angus Gratton 3ebf7923d3 lwip: Route LWIP socket POSIX I/O functions via IDF VFS layer
No more conflicts between LWIP & newlib read(), write(), fcntl(), etc.

select() still only works if all of the fds are sockets.

Closes https://github.com/espressif/esp-idf/issues/273
2017-10-16 09:45:49 +08:00
Angus Gratton a320fed3b5 vfs: Add ioctl() to filesystem set 2017-10-16 09:45:49 +08:00
Angus Gratton 0c50b65a34 lwip: Increase minimum TCP/IP task stack size if log level is Debug or Verbose
... unless nano formatting is enabled.

Fixes stack overflow in tcpip_adapter at the default level, as reported on forum:
https://esp32.com/viewtopic.php?f=2&t=3250&p=15538#p15447
2017-10-16 09:43:23 +08:00
Angus Gratton b013f5d490 Merge branch 'bugfix/freertos_resume_scheduler_pending_tasks' into 'master'
freertos: Fix bug with xTaskResumeAll() not resuming all tasks

See merge request !1330
2017-10-16 09:43:04 +08:00
Ivan Grokhotkov 1da3204a7c spiram: expose function to initialize SPI RAM cache
Some frameworks based on ESP-IDF need to be able to decide whether to
initialize SPI RAM after the application has started. This change splits
out part of esp_spiram_init which manipulate cache MMU into a separate
function. Applications can disable cache, call esp_spiram_init_cache,
re-enable cache, and then call esp_spiram_init.
Disabling and re-enabling the cache can be achieved using functions
provided in esp_spi_flash.h.
2017-10-16 09:15:11 +08:00
He Yin Ling 3a271a4ae7 Merge branch 'bugfix/freertos_dual_core_hooks' into 'master'
bugfix/freertos_dual_core_hooks

See merge request !1399
2017-10-14 09:41:03 +08:00
Jiang Jiang Jian a1d23051b4 Merge branch 'bugfix/tw15538_ipv6_socket_close_error' into 'master'
lwip: init lwip error code

See merge request !1379
2017-10-13 19:15:44 +08:00
Darian Leung 95d63137d1 bugfix/freertos_dual_core_hooks
This commit fixes bugs with the dual core changes to freeRTOS tick and idle hooks.
Interrupt watchdog now registers tick hooks to both cores.
API for cross core tick and idle hook registration were also added
2017-10-13 18:27:53 +08:00
XiaXiaotian c730f676c3 Reduce minimum number of WiFi static tx buffer
Calibrate tx power after sending five packets
2017-10-13 17:11:31 +08:00
Jiang Jiang Jian 713dee57f0 Merge branch 'feature/add_const_for_wifi_api' into 'master'
esp32: add const for some WiFi api

See merge request !1394
2017-10-13 17:08:29 +08:00
Liu Zhi Fu 3bcaa592ee lwip: refactor to socket ping
Do some refactor to socket ping:
1. Add ping_deinit to kill ping thread
2. Apply configuration set by esp_ping_set_target to socket ping
3. Limit only one ping thread
2017-10-13 16:37:09 +08:00
Jiang Jiang Jian a0ad3ff008 Merge branch 'bugfix/btdm_fix_set_attr_value_crash_when_length_is_0' into 'master'
component/bt: fix crash when the length of attr value set zero

See merge request !1397
2017-10-13 16:00:15 +08:00
Liu Zhi Fu e2d077cea1 lwip: init lwip error code
Init the error code to ERR_OK when call tcpip_apimsg
2017-10-13 15:59:04 +08:00
Jiang Jiang Jian 90be957af1 Merge branch 'bugfix/btdm_fix_register_app_id_failed_when_more_than_3' into 'master'
component/bt: fix register more than three app_ids failed

See merge request !1389
2017-10-13 15:57:00 +08:00
Liu Zhi Fu e04a0d66b8 esp32/tcpipadapter: correct eth ip got event info
1. Raise SYSTEM_EVENT_ETH_GOT_IP when eth got ip
2. Add default handler for SYSTEM_EVENT_ETH_GOT_IP
3. Minor change about ethernet kconfig
2017-10-13 15:56:51 +08:00
Jiang Jiang Jian 6ff5c32ae5 Merge branch 'feature/alloc_memories_of_wifi_and_lwip_in_spiram_first' into 'master'
Allocate some memories in SPIRAM first.

See merge request !1367
2017-10-13 15:47:27 +08:00
Jiang Jiang Jian aa7a1e5e2d Merge branch 'bugfix/btdm_controller_deinit' into 'master'
component/bt : allow init after de-init

See merge request !1371
2017-10-13 15:44:58 +08:00
Liu Zhi Fu 0e586a4cdf esp32: add const for some WiFi api
Add const if the pointer parameter is const
2017-10-13 15:10:34 +08:00
zhiweijian 520b3340f6 Component/bt: fix crash when set attr value 0 2017-10-13 15:06:08 +08:00
XiaXiaotian 5df39cd4b6 Allocate some memories in SPIRAM first.
Try to allocate some WiFi and LWIP memories in SPIRAM first. If
    failed, try to allocate in internal RAM then.
2017-10-13 10:11:24 +08:00
Angus Gratton 0a52dbccca Merge branch 'bugfix/spi_reset_race' into 'master'
periph_ctrl: Refactor to add periph_module_reset(), avoid potential race in SPI DMA workaround

See merge request !1349
2017-10-13 08:51:36 +08:00
Angus Gratton 5d8bd1aa9e Merge branch 'bugfix/libsodium_mbedtls_sha' into 'master'
libsodium: Fix mbedTLS SHA256 & SHA512 implementation, make optional

See merge request !1329
2017-10-13 08:50:24 +08:00
Ivan Grokhotkov 715d081341 freertos: fix compilation errors with portMUX debugging enabled
Fixes https://github.com/espressif/esp-idf/issues/1057

Ref TW15702.
2017-10-13 08:33:57 +08:00
Ivan Grokhotkov 3cf23ff77d sdmmc: allow command timeouts to be configured
Previously the timeout was set to the same value (1000ms) for all kinds
of commands. In some cases, such as with slow cards, write commands
failed to complete in time.
This change makes command timeouts configurable via sdmmc_host_t
structure, and also makes default timeouts different for ordinary
commands and write commands.

Closes https://github.com/espressif/esp-idf/issues/1093

Ref TW15774.
2017-10-13 08:16:07 +08:00
Angus Gratton ca7485cc9a freertos: Remove "stop program on scheduler start when JTAG/OCD is detected" option
No longer used with new dual core target & JTAG instructions.
2017-10-13 10:54:02 +11:00
Ivan Grokhotkov ab13db0e45 nvs: fix nvs_flash_init_partition initializing default partition
Fixes https://github.com/espressif/esp-idf/issues/1052.

Ref TW15698.
2017-10-13 07:19:16 +08:00
Ivan Grokhotkov 4d42b5ea24 console: handle empty input to esp_console_run correctly
Fixes https://github.com/espressif/esp-idf/issues/1067

Ref. TW15752
2017-10-13 07:14:53 +08:00
zhiweijian 49ad8bf6c3 Component/bt: fix register more than 3 app_id failed 2017-10-12 21:07:40 +08:00
Jiang Jiang Jian 8e47c355fa Merge branch 'feature/i2s_apll' into 'master'
driver/i2s: add support apll clock

See merge request !1115
2017-10-12 19:06:50 +08:00
Jiang Jiang Jian 244e947beb Merge branch 'bugfix/btdm_fix_add_whitelist_failed' into 'master'
Component/bt: fix add whitelist failed

See merge request !1326
2017-10-12 19:01:01 +08:00
Jiang Jiang Jian dbee895741 Merge branch 'bugfix/phy_init_remove_descriptions' into 'master'
phy init: remove descriptions of PHY init parameters

See merge request !1363
2017-10-12 19:00:10 +08:00
Jiang Jiang Jian f8caa403db Merge branch 'bugfix/btdm_remove_bond_device_not_return_error' into 'master'
component/bt: Fixed the bug when remove the bonded device with not exist address…

See merge request !1370
2017-10-12 18:59:09 +08:00
Jiang Jiang Jian 73462c052e Merge branch 'bugfix/btdm_fix_set_scan_params_not_work' into 'master'
component/bt: fix scan params not work when start scan

See merge request !1307
2017-10-12 18:57:36 +08:00
Jiang Jiang Jian e0922c9564 Merge branch 'bugfix/i2s_set_pin_valid_gpio' into 'master'
change to GPIO_IS_VALID_OUTPUT_GPIO for data out pin

See merge request !764
2017-10-12 18:21:25 +08:00
Jiang Jiang Jian da247c2cf8 Merge branch 'bugfix/ledc_duty_type_change' into 'master'
ledc_get_duty return type changed from int to uint32_t, target_duty changed from int to uint32_t

See merge request !752
2017-10-12 18:18:33 +08:00
Jiang Jiang Jian 52be20343b Merge branch 'bugfix/tw15438_mem_leak_on_wifi_start_stop_loop' into 'master'
Release DHCP structure memory when netif is down.

See merge request !1386
2017-10-12 17:51:58 +08:00
Jiang Jiang Jian a4e4322f6c Merge branch 'bugfix/btdm_set_sec_properity_error' into 'master'
component/bt: Fix bug of set sec properity error

See merge request !1336
2017-10-12 17:45:32 +08:00
Jiang Jiang Jian 3f1198529f Merge branch 'bugfix/fail_to_connect_in_wps' into 'master'
WiFi :bug fix of fail to connect in wps

See merge request !1384
2017-10-12 17:39:29 +08:00
XiaXiaotian ad1350f0ac Release DHCP structure memory when netif is down. 2017-10-12 17:03:44 +08:00
Angus Gratton 3a4bd7f16c Merge branch 'bugfix/wifi_tx_buffer_doc' into 'master'
wifi docs: Clarify WIFI_DYNAMIC_TX_BUFFER_NUM config item limit

See merge request !1375
2017-10-12 13:20:28 +08:00
Angus Gratton f3681e22de wifi docs: Clarify WIFI_DYNAMIC_TX_BUFFER_NUM config item limit
Setting WIFI_DYNAMIC_TX_BUFFER_NUM to zero is not possible.

Also edit some of the related config docs a little.
2017-10-12 15:53:53 +11:00
Deng Xin a99c89f6af bug fix of fail to connect in wps 2017-10-12 12:01:11 +08:00
Yulong 7617a3c434 component/bt: Fix the bug cann't use esp_ble_gatts_get_attr_value to get the attribute value after long write. 2017-10-11 07:47:12 -04:00
Deng Xin a05867f673 Wifi: bugfix of fail to reconnect after reboot
fix the issue fail to reconnect after reboot
2017-10-11 17:58:36 +08:00
Jiang Jiang Jian 3ed90a559d Merge branch 'bugfix/btdm_fix_multi_connection_failed' into 'master'
component/bt: modify some comments

See merge request !1332
2017-10-11 17:00:34 +08:00
zhiweijian cd3d9715bb Component/bt: fix add whitelist failed
- fix add whitelist failed
- add add whitelist callback func
2017-10-11 15:30:09 +08:00
Angus Gratton 353e81da63 freertos: Also test (& handle) the case where scheduler is disabled on other CPU...
ie CPU A has scheduler disabled and task blocked on Q. CPU B sends to Q (or gives mutex, etc.) Task on CPU A should be woken on scheduler resume.
2017-10-11 10:48:20 +11:00
Angus Gratton 3e62c2e052 freertos: When scheduler is disabled, tasks on other core should immediately resume
... if triggered by a SemaphoreGive/etc.

Previously they would resume after scheduler was resumed, on next
RTOS tick of other CPU.
2017-10-11 10:48:20 +11:00
Angus Gratton f2f9170abc freertos: Fix bug with xTaskResumeAll() not resuming all tasks
Previously if multiple tasks had been added to xPendingReadyList for the CPU, only the first one was resumed.

Includes a test case for resuming multiple (pending) tasks on xTaskResumeAll().

Document the limitation that while scheduler is suspended on one CPU, it can't wake tasks on either CPU.
2017-10-11 10:48:20 +11:00
Yulong fc359e4491 component/bt: Change the _btc_storage_remove_ble_bonding_keys function ret default vaule from 1 to 0. 2017-10-10 04:19:11 -04:00
Yulong 25e8c09b6d component/bt: Change the param.remove_bond_dev_cmpl.status value. 2017-10-10 04:02:05 -04:00
Tian Hao b54ef13fae component/bt : allow init after de-init 2017-10-10 15:35:17 +08:00
Angus Gratton 30b40a2175 Merge branch 'bugfix/ff_ioctl_types' into 'master'
fatfs: use correct return types in ioctl calls

See merge request !1362
2017-10-10 15:01:47 +08:00