Commit graph

5778 commits

Author SHA1 Message Date
Mahavir Jain e9652e8ef3 uart: use correct critical section API (portENTER_CRITICAL_ISR) from ISR context 2019-02-27 08:36:47 +00:00
Angus Gratton 42f64e9a93 Merge branch 'bugfix/tw28146_make_wifi_iram_optimization_configurable' into 'master'
esp32: make WiFi IRAM optimization configurable

See merge request idf/esp-idf!4037
2019-02-27 16:33:05 +08:00
Ivan Grokhotkov 37b55a5eb5 esp32: print ELF file SHA256 in panic handler 2019-02-27 13:30:25 +08:00
Ivan Grokhotkov ea52a19c00 build system: include SHA256 hash of ELF file into app_desc structure 2019-02-27 13:30:25 +08:00
Angus Gratton 80f02cd0ea Merge branch 'bugfix/bootloader_freq_check_runtime' into 'master'
bootloader: check previously used clock frequency at run time

See merge request idf/esp-idf!3827
2019-02-27 13:22:47 +08:00
Angus Gratton fab11e1cec Merge branch 'bugfix/cmake_psram_fix_flag' into 'master'
cmake: Fix psram workaround compiler flag application

See merge request idf/esp-idf!4335
2019-02-27 13:20:21 +08:00
Ivan Grokhotkov 1bc831f074 Merge branch 'bugfix/esp_timer_monotonic_test' into 'master'
esp_timer: fix occasional failures in "esp_timer_get_time returns monotonic values" test

See merge request idf/esp-idf!4340
2019-02-27 11:08:53 +08:00
Liu Zhi Fu 711173b3d6 esp32: make WiFi IRAM optimization configurable
With this feature, the WiFi IRAM optimization can be disabled/enabled via menuconfig.
2019-02-26 19:55:57 +08:00
Ivan Grokhotkov 8cc6226051 soc: define named constants for DPORT_CPUPERIOD_SEL values 2019-02-26 17:07:59 +08:00
Ivan Grokhotkov 178e5b25e6 bootloader: check previously used clock frequency at run time
In the situation when bootloader was compiled for 240MHz, and app was
compiled for 160MHz, and the chip is a revision 0 chip, the
bootloader will assume that the application has also been running at
240MHz. This will cause the chip to lock up later. Modify this to use
a run time check of DPORT_CPUPERIOD_SEL, which indicates which of the
PLL frequencies was used.

Closes https://github.com/espressif/esp-idf/issues/2731.
2019-02-26 17:02:34 +08:00
Ivan Grokhotkov dda0208614 soc/rtc_clk: don’t clear DPORT_CPUPERIOD_SEL when switching to XTAL
This is not necessary since RTC_CNTL_SOC_CLK_SEL is set before this.
2019-02-26 17:02:34 +08:00
Ivan Grokhotkov 140b6e3893 Merge branch 'bugfix/nvs_hash_blocks_eager_cleanup' into 'master'
nvs: do eager cleanup of HashListBlocks

See merge request idf/esp-idf!4337
2019-02-26 12:28:10 +08:00
Angus Gratton da390618c2 cmake: Fix psram workaround compiler flag application
Previously, this compiler flag was not being applied
regardless of CONFIG_SPIRAM_CACHE_WORKAROUND setting.

Explanation: add_compile_options() only applies to
source files added after the function is run, or in
subdirectories added after the function is run. In
this case, no new source files were being added after
this function was run.
2019-02-26 04:07:51 +00:00
Angus Gratton 3952d25a99 Merge branch 'feature/add_api_get_rmt_idle_level' into 'master'
feature(rmt):  fixed some RMT related issues.

See merge request idf/esp-idf!3864
2019-02-26 11:57:10 +08:00
Angus Gratton ca72c3e97b Merge branch 'bugfix/fix_dig_gpio_unable_hold_bug' into 'master'
bugfix(gpio):  fixed digital gpio unable hold bug during deep-sleep.

See merge request idf/esp-idf!3877
2019-02-26 11:56:27 +08:00
Angus Gratton 280d39aedd Merge branch 'bugfix/i2s_pdm_adc_use_apll' into 'master'
bugfix(i2s): allow to use apll in pdm/adc/dac mode

See merge request idf/esp-idf!3800
2019-02-26 11:47:49 +08:00
Angus Gratton b966ef9fcd Merge branch 'bugfix/update_ledc_register_and_fix_fade_scale' into 'master'
Bugfix (ledc):  Fixed ledc fade scale  bug

See merge request idf/esp-idf!4109
2019-02-26 11:46:28 +08:00
Angus Gratton f614f5bfa9 Merge branch 'feature/http_server_err_handling' into 'master'
http_server : Add feature for invoking user configurable handlers during server errors

See merge request idf/esp-idf!4229
2019-02-26 11:12:06 +08:00
Ivan Grokhotkov d3724dc35d esp_timer: fix occasional failures in "monotonic values" test
1. ref_clock used in unit tests occasionally produces time off by ~100
microseconds shortly after being started. Add a delay to let
ref_clock stabilise, until the cause is found.

2. Reduce roundoff error accumulation which would occasionally cause
the test to fail, by choosing an overflow value which can be divided
by APB frequency.

3. Move time sampling part of the test into an IRAM function to
reduce variations due to cache behavior.

4. Remove calculation of "standard deviation" in the test, as what was
calculated was not actually standard deviation, and it did not add any
useful information.
2019-02-26 02:01:29 +00:00
Ivan Grokhotkov dae40f4ff1 nvs: add a blob fragmentation test case
Ref. TW12937
2019-02-26 01:58:20 +00:00
Ivan Grokhotkov 02a76abb8b nvs: do eager cleanup of HashListBlocks
Previously when HashList was removing items, HashListBlocks were
removed lazily. This resulted in empty HashListBlocks dangling around
in full pages, even when all items have been erased. These blocks
would only be deleted when NVS was re-initialized
(nvs_flash_deinit/nvs_flash_init).

This change does eager cleanup instead, based on the code from
@negativekelvin offered in
https://github.com/espressif/esp-idf/issues/1642#issuecomment-367227994.

Closes https://github.com/espressif/esp-idf/issues/1642.
2019-02-26 01:58:20 +00:00
Roland Dobai aa9d302814 VFS: Implement poll() based on select()
Closes https://github.com/espressif/esp-idf/issues/2945
2019-02-25 10:34:27 +01:00
Anurag Kar 1af5d0d87c https_server : Missing uri_match_fn paramater added to default config 2019-02-25 09:13:39 +00:00
Anurag Kar 28412d8cb6 http_server : Added feature for invoking user configurable handlers during server errors
Added APIs :
  * httpd_resp_send_err()        : for sending HTTP error responses for error codes given by httpd_err_code_t. It uses TCP_NODELAY option to ensure that HTTP error responses reach the client before socket is closed.
  * httpd_register_err_handler() : for registering HTTP error handler functions of type httpd_err_handler_func_t.

The default behavior, on encountering errors during processing of HTTP requests, is now to send HTTP error response (if possible) and close the underlying socket. User configurable handlers can be used to override this behavior for each error individually (except for 500 Internal Server Error).

Also fixed some typos.

Closes https://github.com/espressif/esp-idf/issues/3005
2019-02-25 09:13:39 +00:00
Ivan Grokhotkov 5ec58c316d Merge branch 'bugfix/multiple_can_bugs' into 'master'
CAN: Add functions to clear queues and fix multiple bugs

See merge request idf/esp-idf!4279
2019-02-25 15:43:56 +08:00
Angus Gratton 7f28bce42e newlib: When using psram, link setlocale() to flash not IRAM 2019-02-22 03:28:41 +00:00
Angus Gratton bd97b139eb newlib: When using psram, link qsort to flash not IRAM 2019-02-22 03:28:41 +00:00
Ivan Grokhotkov 4ae2c4c282 Merge branch 'feature/coredump_improvements_refactoring' into 'master'
coredump: improvements, refactoring (separate FLASH and UART functionality)

See merge request idf/esp-idf!4207
2019-02-21 11:04:19 +08:00
Angus Gratton 5b945cb611 Merge branch 'bugfix/mdns_service_memory_leak' into 'master'
mdns: fix memory leak when query for service plus various other fixes

See merge request idf/esp-idf!4270
2019-02-21 06:03:48 +08:00
Angus Gratton 40a55823a9 Merge branch 'feature/anti_rollback_efuse' into 'master'
Support anti-rollback

See merge request idf/esp-idf!3682
2019-02-20 16:11:00 +08:00
Angus Gratton 91f97d121f Merge branch 'revert-23a03cf6' into 'master'
Revert "Merge branch 'bugfix/external_rtc_start_fail' into 'master'"

See merge request idf/esp-idf!4292
2019-02-20 15:09:35 +08:00
Angus Gratton 52565ce1a1 Merge branch 'bugfix/btdm_fix_connection_params_update_issues' into 'master'
component/bt: fix connection params issues

See merge request idf/esp-idf!4276
2019-02-20 14:18:11 +08:00
Jiang Jiang Jian c960bcb5e6 Merge branch 'bugfix/coex_lc_protect' into 'master'
component/esp32 : fix coexist lc protect cause memory corrupted

See merge request idf/esp-idf!4265
2019-02-20 02:11:37 +08:00
Tian Hao 64b7b0f94c Reduce part of IRAM consumption in wifi libnet80211.a
It might be a little effect of WIFI max TX throughput if the limitation is cache hit rate
2019-02-19 15:43:56 +08:00
Angus Gratton 5b182eefc1 Merge branch 'bugfix/spiram_linker_wildcards' into 'master'
newlib: Provide library name for ROM libc object files linked as PSRAM workarounds

See merge request idf/esp-idf!4152
2019-02-19 13:28:10 +08:00
Ivan Grokhotkov dc133f9fc4 Revert "Merge branch 'bugfix/external_rtc_start_fail' into 'master'"
This reverts merge request !2441
2019-02-19 12:39:47 +08:00
Tian Hao 2cf4c02be9 component/esp32 : fix coexist lc protect cause memory corrupted
The bug will cause memory corrupted (the largest range is from 0x3ffc0000 ~ 0x3ffc8000),
some strange error will happen, like IllegalInstruction, LoadProhibited and .etc.
2019-02-19 03:28:47 +00:00
Angus Gratton 298fa2168a Merge branch 'bugfix/freertos_unused_xSize' into 'master'
freertos: Fix unused variable warning

See merge request idf/esp-idf!4281
2019-02-19 10:48:04 +08:00
Angus Gratton 6538acc94f Merge branch 'bugfix/wdt_compability_app_with_old_bootloader' into 'master'
esp32: Fix wdt settings in esp_restart_noos

See merge request idf/esp-idf!4098
2019-02-19 10:42:33 +08:00
Angus Gratton 8cd2534213 Merge branch 'bugfix/nvs_key_part_check_err' into 'master'
nvs_flash: Detect key partition as uninitialised even if encrypted by bootloader

See merge request idf/esp-idf!4224
2019-02-19 10:22:04 +08:00
Darian Leung 099b83af67 CAN: Add functions to clear queues and fix multiple bugs
This commits adds the functions can_clear_transmit_queue() and
can_clear_receive_queue(). Closes #2906

The following bug are fixed:

- CAN_IO_UNUSED is now explicitly cast to enum type. Closes #2825
- Fix multiple documentation errors. Closes #2898, Closes #2794
- can_reconfigure_alerts() returns incorrect current_alerts. Closes #3028
- Add missing header file. Closes #3065
2019-02-18 21:31:33 +08:00
zwj faf9126ed4 component/bt: fix connection params update issues 2019-02-18 19:52:16 +08:00
Angus Gratton bcc21d2262 Merge branch 'feature/wifi_provisioning_handler_ctx' into 'master'
Provisioning : Various fixes in protocomm and wifi_provisioning components

See merge request idf/esp-idf!4188
2019-02-18 08:06:12 +08:00
Michael (XIAO Xufeng) 86bcd56109 spi: fix the bug of connecting SPI peripheral to read-only pins
The requirements of pin capabilites is different for spi master and
slave.  The master needs CS, SCLK, MOSI to be output-able, while slave
needs MISO to be output-able.

Previous code is for master only.

This commit allows to place other 3 pins than MISO on input-only pins
for slaves. Refactoring for spi_common is also included.

Resolves https://github.com/espressif/esp-idf/issues/2455
2019-02-16 20:03:14 +08:00
Jiang Jiang Jian 2ce401c664 Merge branch 'bugfix/btdm_crash_when_inquiry_cancel' into 'master'
Bugfix/btdm crash when inquiry cancel

See merge request idf/esp-idf!4142
2019-02-16 16:27:49 +08:00
Darian Leung 7a174f99a3 freertos: Fix unused variable warning
This commit fixes an unused variable warning when
configASSERT is undefined.
2019-02-16 01:42:00 +08:00
David Cermak 8462751f95 mdns: fix memory leak in pbuf if tcpipadapter failed to get netif 2019-02-15 15:59:11 +01:00
David Cermak 1a027734af mdns: fix malfuctional query_txt
when running a query for a single txt, result entries were not created and attached to result structure. this issue was introduced when fixing memory leak in txt structure, which worked correctly for PTR queries, but caused trouble for TXT query.
2019-02-15 13:46:51 +01:00
David Cermak 206b47c03a mdns: fix possible crash when mdns_free called while action queue not empty 2019-02-15 13:23:21 +01:00
Anurag Kar f3a6c63920 protocomm : typos fixed and descriptions corrected 2019-02-15 10:45:34 +00:00