Commit graph

3855 commits

Author SHA1 Message Date
Ivan Grokhotkov 01cd2fce73 sdmmc: print error status only once 2018-04-11 11:06:50 +08:00
Ivan Grokhotkov 5fc6fb58ea sdmmc: don't whitelist the opcodes when handling response timeout
All the commands which do not have a response must have their flags set
accordingly. Therefore the host will not send RTO interrupt if response
is not expected. It is a bug in the code logic if it happens otherwise.
2018-04-11 11:06:50 +08:00
Ivan Grokhotkov f02cff13cc sdmmc: set highest possible host clock divider
SDMMC host suffers from an issue that it outputs data near the rising
edge of the card clock, which is the edge used by the card to sample
data. If sampling time constraint is not satisfied, card may read data
after the transition.

The phases of output/input data can, in fact, be adjusted. However this
adjustment happens in the clock generation block outside of the host.
So the maximum phase change which can be created this way is equal to
half of the host clock period. So if the host clock is set to the lowest
possible frequency (for the given card frequency), then the phase offset
(and hence the hold time) will be the highest. This change modifies the
logic used to determine clock dividers accordingly.

sdmmc host: set correct dout phase and print correct frequency
2018-04-11 11:06:50 +08:00
Ivan Grokhotkov 84d6793f77 sdmmc: don't set data_expected on SET_BUS_WIDTH command
SET_BUS_WIDTH is not a data transfer command. Extensive search in the
host datasheet and SD card spec did not reveal the origin of this hack
or 'feature'. Further testing showed that removing this does not lead to
regressions.
2018-04-11 11:06:50 +08:00
Ivan Grokhotkov 42de5fb76d sdmmc: send init sequence before CMD0 2018-04-11 11:06:50 +08:00
Ivan Grokhotkov 907fc1167a gpio: add special GPIO signal values 2018-04-11 11:06:50 +08:00
huchaoru f409a33653 test: update ci test case 2018-04-10 14:08:10 +00:00
Ivan Grokhotkov 2522c1b2f9 Merge branch 'bugfix/rtc_clk_fixes' into 'master'
Power management and RTC fixes

See merge request idf/esp-idf!2131
2018-04-10 18:17:02 +08:00
baohongde 52dbcef908 component/bt: Fix exception when there is no device name 2018-04-10 17:55:33 +08:00
Roland Dobai 744c2dcdd9 Resolve problems found by enabling -Wwrite-strings compilation flag 2018-04-10 08:53:43 +02:00
Angus Gratton f7b7b4ef59 Merge branch 'bugfix/mdns_fixes' into 'master'
MDNS: Fix some issues when hostname is not set or services are removed

See merge request idf/esp-idf!2179
2018-04-10 13:43:02 +08:00
Angus Gratton 2914111c8c Merge branch 'bugfix/heap_fragmentation_on_split_pr1761' into 'master'
heap: Try to merge tail with next block when splitting

See merge request idf/esp-idf!2147
2018-04-10 12:14:57 +08:00
kooho ccf09c3b39 driver(gpio): Add api support digital pad hold function. 2018-04-10 11:31:59 +08:00
Angus Gratton 2bfef060ba Merge branch 'bugfix/small_fixes_from_github' into 'master'
Bugfix/small fixes from github

See merge request idf/esp-idf!2200
2018-04-10 09:19:19 +08:00
Angus Gratton 58ed6cc9af Merge branch 'bugfix/wifi_ps_modem' into 'master'
wifi: Add WIFI_PS_MODEM for backwards compatibility with V3.0 API

See merge request idf/esp-idf!2203
2018-04-10 09:18:53 +08:00
baohongde 789edc0b52 component/bt: Add API: get cod & set cod
In response to: https://github.com/espressif/esp-idf/issues/1565
2018-04-09 19:25:26 +08:00
Angus Gratton 97a382077f wifi: Add WIFI_PS_MODEM for backwards compatibility with V3.0 API 2018-04-09 16:55:38 +10:00
me-no-dev 421c6f154b Fix exception when service is removed while there are pending packets that depend on it 2018-04-09 09:40:08 +03:00
Tian Hao 1bde34c1f1 component/esp32 : remove pm gpio dbg 2018-04-09 14:33:48 +08:00
Ivan Grokhotkov b11209b070 Merge branch 'feature/esp-tls' into 'master'
feature/add simplified TLS socket APIs

See merge request idf/esp-idf!1951
2018-04-09 14:25:21 +08:00
Anton Maklakov 046ff2e628 Make error codes looks like literals in the code of them (easy for searching). Minor fixes, typos 2018-04-09 13:54:18 +10:00
Ing. Jaroslav Šafka 3d89c8ba74 rmt: Fix LoadProhibited on RX END
Fixes exceptions LoadProhibited, when rmt tries read variable p_rmt on RX END which can be 0.
It happens after esp_reset()  (OTA) and the rmt is not probably stopped by it.
In other words the routine rmt_driver_isr_default was called before second rx channel was registered.

scenario:
register tx channel
register rx channel
reboot
register tx channel
-> exception (because rx channel is accessed)

Merges https://github.com/espressif/esp-idf/pull/1671
2018-04-09 12:29:05 +10:00
Mixerito 9f39411e80 esp32: get_chip_info_esp32() return correct model number
out_info->model was zeroed by memset

Merges https://github.com/espressif/esp-idf/pull/1760
2018-04-09 12:28:23 +10:00
Fredrik 97c6a94a03 Bugfix GPIO_DIS_OUTPUT to work with pin 32 and up
Merges https://github.com/espressif/esp-idf/pull/1796
2018-04-09 12:28:23 +10:00
Jitin George b09c3e9878 mbedtls integration in esp-tls 2018-04-06 17:16:27 +05:30
Jitin George 30b50cbfb3 esp-tls header file name change 2018-04-06 17:16:27 +05:30
Jitin George e29294b49a Resolved Issues 2018-04-06 17:16:27 +05:30
Jitin George 8a1dcc0765 CA Certificate verification 2018-04-06 17:16:27 +05:30
Kedar Sovani 8211a16207 Use esp-tls in the http2 example 2018-04-06 17:16:27 +05:30
Kedar Sovani 070884fc2e Include error log in case of error 2018-04-06 17:13:14 +05:30
Kedar Sovani 433bd8c91c Minor fixes 2018-04-06 17:13:14 +05:30
Kedar Sovani 1c72c8d126 Supports TLS with HTTP2 client 2018-04-06 17:13:14 +05:30
Kedar Sovani eb051fe72f Minor fixes 2018-04-06 17:13:14 +05:30
Anuj Deshpande adbcaf8938 Cast to remove warnings 2018-04-06 17:13:14 +05:30
Kedar Sovani e45024e088 Don't use 'port' number for DNS query
- In some cases where the HTTP URL contains the port number
(http://hostname:334), the DNS querier fails to resolve the hostname.
- Hence we have to populate the port number ourselves.
- This can only be done based on whether we get an IPv4 or IPv6
  address.
2018-04-06 17:13:14 +05:30
Kedar Sovani 306d59d32c Make read/write function pointers
as per Ivan's feedback
2018-04-06 17:13:14 +05:30
Kedar Sovani 7f35c4ff3e esp-tls: Basic structure
Purpose:
1. TLS calls can be too many, and require a user to know the expected behaviour. A simple TLS socket wrapper that can be used in any higher level protocol.
2. Uses OpenSSL compatibility layer, so applications using esp-tls can be built on the host, and it should just work on ESP
2018-04-06 17:13:14 +05:30
Angus Gratton 5b05a1f822 make: Build out of tree component srcs under component build dir
Strips leading ../ when generating object file paths, keeps these in sync with the source files
otherwise.

This prevents object files landing in other directories, including outside the build directory, if
the component_srcdirs start with ../
2018-04-06 13:10:19 +10:00
Xia Xiaotian e727582180 Fix two WiFi and LWIP typos
1. close github issue: https://github.com/espressif/esp-idf/issues/1792
    2. close github issue: https://github.com/espressif/esp-idf/issues/1781
2018-04-05 11:46:42 +08:00
qiyueixa 2984cdbbe3 add mesh feature 2018-04-04 22:57:45 +08:00
Jiang Jiang Jian c842725be0 Merge branch 'bugfix/pm_coex_minor_things' into 'master'
Bugfix/pm coex minor things

See merge request idf/esp-idf!2180
2018-04-04 17:54:40 +08:00
Ivan Grokhotkov 1a302cbac1 Merge branch 'bugfix/open_uart_non_blocking' into 'master'
Make UART non-blocking when the file descriptor was opened with the O_NONBLOCK flag

See merge request idf/esp-idf!2153
2018-04-04 14:43:31 +08:00
Angus Gratton 53234ef2bc Merge branch 'refactor/rtc_split_module' into 'master'
bugfix(rtc): make sure peripherals (DAC, HALL) are turned off before conversion.

See merge request idf/esp-idf!1848
2018-04-04 09:00:58 +08:00
Tian Hao 58e7464dc0 component/esp32 : clear some minor thingsw about PM and coexistence 2018-04-03 20:13:49 +08:00
Ivan Grokhotkov 595ddfd825 Merge branch 'feature/build_ssc_in_multiple_ci_jobs' into 'master'
CI: support build SSC in multiple jobs

See merge request idf/esp-idf!1622
2018-04-03 18:20:38 +08:00
Ivan Grokhotkov 139d49894c Merge branch 'feature/deactivate_wakeup_trigger' into 'master'
esp32: Add deactivation of wake up trigger for different sources

See merge request idf/esp-idf!2079
2018-04-03 15:19:10 +08:00
Angus Gratton 3ccb12530b heap: Change test_multi_heap_on_host multi-config to bash script not Makefile
Hopefully fix some CI building issues with parallel builds.
2018-04-03 16:34:02 +10:00
kooho 305c788c60 driver(uart): Add API to get the position of cmd_char 2018-04-03 12:34:16 +08:00
Deomid Ryabkov 4b7eb1792e Try to merge tail with next block when splitting
When splitting a memory block, check if the next block is free.
If it is, then just extend it upwards instead of creating a new block.
This fixes a bug where when shrinking existing allocations would result in irreversible free space fragmentation.

When testing on the host, test all the poisoning configurations.
2018-04-03 12:30:52 +10:00
Jiang Jiang Jian 393f3da37c Merge branch 'feature/btdm_add_get_local_used_addr_API' into 'master'
Component/bt: add esp_ble_gap_get_local_used_addr() API

See merge request idf/esp-idf!2137
2018-04-02 22:28:00 +08:00
Jiang Jiang Jian 7133e14eee Merge branch 'feature/wifi_bt_new_coex' into 'master'
Feature/wifi bt new coex

See merge request idf/esp-idf!2087
2018-04-02 22:20:31 +08:00
zhiweijian a6c79cfe0f Component/bt: do not update connection params when already have keys in slave 2018-04-02 19:44:09 +08:00
He Yin Ling 3b3ad875c4 test: use SSC_BLE_WIFI to test NVS cases 2018-04-02 18:13:52 +08:00
Ivan Grokhotkov aca0008694 Merge branch 'bugfix/sdspi_init_v1_card' into 'master'
sdspi: compatibility fixes for SD v1.0 cards

See merge request idf/esp-idf!1927
2018-04-02 13:48:46 +08:00
island 9b7454de0c support wifi&bt coexist (v0.9.1)
1. refactor wifi modem sleep
2. refactor wifi and bt phy enable/diable coexistence
3. support wifi&bt coexist (v0.9.1)
3. add coex pause resume
4. fix bt library interrupt reaction slowly
5. make a2dp more smooth when coex
6. add coexist preference option
7. Make CI do not check libcoexist.a printf/ets_printf
8. disable Wifi RX AMPDU when software coexistence enable && update wifi lib
9. bluetooth call modem sleep api
2018-04-02 13:44:48 +08:00
Ivan Grokhotkov d6b1d0bb3d fatfs/test: enable tests on SD card 2018-04-02 10:57:45 +08:00
Jiang Jiang Jian 8eaae96658 Merge branch 'bugfix/flash_mapp' into 'master'
spi_flash: add api to get valid mmu table pages number

See merge request idf/esp-idf!2070
2018-03-30 19:32:35 +08:00
Jiang Jiang Jian f46ad1fec8 Merge branch 'bugfix/btdm_fix_get_PID_key_error' into 'master'
Component/bt: fix get PID key error

See merge request idf/esp-idf!2156
2018-03-30 19:26:31 +08:00
Ivan Grokhotkov e20e64ace9 fatfs/test: use 16k cluster size to speed up formatting 2018-03-30 18:49:42 +08:00
Ivan Grokhotkov 4a2489b99a sdspi: fix compatibility issue in multi block read
SDSPI driver optimized polling of the response tokens by requesting
two extra bytes on top of the block size (512) and CRC (2), and
checking whether these bytes contained the data response token or
not. In case the token was there, further polling would not need to
happen, thereby reducing latency between two consecutive blocks
transferred. However this caused compatibility issues when these two
extra bytes were sent after reading the final block. When
STOP_TRANSMISSION command was sent, these extra two bytes were
treated as part of the command, causing an invalid command error.

This fixes the logic by only requesting extra two bytes if the block
being read is not the final block. In addition to that, more strict
error checking is implemented for command response tokens.
2018-03-30 18:49:42 +08:00
Ivan Grokhotkov 229f67b816 sdspi: handle delayed R1 responses for data read commands 2018-03-30 18:49:42 +08:00
Ivan Grokhotkov bbbdec24d9 sdspi: handle error flags for R3/R7 responses
Previously error flags were only handled for R1 responses. This change
moves error handling into a separate function and calls it for R1/R3/R7.
2018-03-30 18:49:42 +08:00
zhiweijian 99872beb6a Component/bt: add set gap icon API 2018-03-30 09:21:53 +00:00
Jiang Jiang Jian e6d6deebc7 Merge branch 'bugfix/btdm_fix_connect_fail_when_remote_addr_is_random' into 'master'
Component/bt: modify open API params

See merge request idf/esp-idf!2116
2018-03-30 17:00:19 +08:00
Jiang Jiang Jian 21099c10f4 Merge branch 'feature/support_enrollee_feature_in_APSTA_mode' into 'master'
feature/support WPS enrollee in APSTA mode

See merge request idf/esp-idf!2120
2018-03-30 16:14:43 +08:00
Jiang Jiang Jian 6ffd089c97 Merge branch 'bugfix/btdm_fix_no_set_rand_addr_event_callback' into 'master'
Component/bt: fix no set rand add callback

See merge request idf/esp-idf!2140
2018-03-30 16:05:32 +08:00
Jiang Jiang Jian b26ab188af Merge branch 'bugfix/btdm_fix_service_change_event_param_error' into 'master'
Component/bt: fix service change event params error

See merge request idf/esp-idf!2150
2018-03-30 14:57:13 +08:00
Jiang Jiang Jian 8b9f237cb9 Merge branch 'feature/i2s_add_expand_function' into 'master'
add a new i2s feature to expand the original i2s width

See merge request idf/esp-idf!1617
2018-03-30 14:51:23 +08:00
Jiang Jiang Jian fc5b15173e Merge branch 'bugfix/btdm_add_some_comment' into 'master'
Component/bt: add some comments

See merge request idf/esp-idf!1949
2018-03-30 14:07:30 +08:00
Jiang Jiang Jian 713529e464 Merge branch 'bugfix/btdm_xQueueGenericSend_assertion' into 'master'
component/bt: Fix xQueueGenericSend assertion

See merge request idf/esp-idf!2130
2018-03-30 14:02:24 +08:00
zhiweijian 109a93bf8c Component/bt: fix get PID key error 2018-03-30 11:31:15 +08:00
zhiweijian e6262375a3 Component/bt: fix connect fail when remote addr type is random 2018-03-29 20:55:31 +08:00
Roland Dobai c55987a3e9 vfs: consider O_NONBLOCK flag while opening UART FD 2018-03-29 14:20:14 +02:00
zhiweijian aa236809ad Component/bt: fix no set rand add callback event 2018-03-29 20:17:14 +08:00
zhiweijian 8a78860b16 Component/bt: add esp_ble_gap_get_local_used_addr() API 2018-03-29 19:47:08 +08:00
He Yin Ling 48e3e3efca test: change SSC binary path 2018-03-29 19:40:07 +08:00
Tian Zhong Xing 49a236dae0 fix CI failed when flash chip size if 2MBytes 2018-03-29 17:48:59 +08:00
zhiweijian f5d581421e Component/bt: fix service change event params error 2018-03-29 16:11:16 +08:00
Alex Lisitsyn cffab50ac3 esp32: Deactivate wakeup trigger after first wakeup
The files updated according to code review discussions.
In the sleep_modes.c removed immidiate disable of ULP  mode and leave just trigger deactivation.
The esp_sleep.h is updated to have the same defines for source as esp_sleep_wakeup_cause_t.
Updated documentation in sleep_modes.rst file to include cross references and address esp_sleep_wakeup_cause_t type.
The get_time_ms() is updated to explicitly use fabs(dt) instead of abs(dt) in  test_sleep.c.
Some other minor changes in test_sleep.c unit test.

(TW#18952)
Closes https://github.com/espressif/esp-idf/issues/1677
2018-03-29 11:24:59 +05:00
kooho 8e1f930582 driver(gpio): Modified the GPIO_CHECK's return value when ISR service already installed 2018-03-29 09:58:31 +08:00
Angus Gratton da27816314 Merge branch 'feat/add_efuse_cpu_freq_rating' into 'master'
efuse/add cpu freq rating

See merge request idf/esp-idf!1994
2018-03-29 05:59:52 +08:00
Angus Gratton a17d12d94f Merge branch 'bugfix/make_error_codes_unique' into 'master'
Make error codes globally unique

See merge request idf/esp-idf!1935
2018-03-29 05:57:04 +08:00
Jiang Jiang Jian 6b8ca31bc9 Merge branch 'bugfix/btdm_slow_interrupt_reaction' into 'master'
component/bt : fix interrupt slow reaction cause assert(interrupt wdt)

See merge request idf/esp-idf!2143
2018-03-28 21:49:19 +08:00
baohongde e1b419fb6d component/bt: Fix xQueueGenericSend assertion 2018-03-28 20:25:57 +08:00
Ivan Grokhotkov 1a157279e0 Merge branch 'doc/adc1_channel_config' into 'master'
adc: Add doc details about configure not needed before each read

See merge request idf/esp-idf!2132
2018-03-28 19:11:44 +08:00
Michael (Xiao Xufeng) cef8baf424 bugfix(rtc): make sure peripherals (DAC, HALL) are turned off before conversion.
refactor structure of ``rtc_module.c`` to make it more clearly.

Closes https://github.com/espressif/esp-idf/issues/1517
2018-03-28 17:10:01 +08:00
Tian Hao 3843bff97b component/bt : fix interrupt slow reaction cause assert(interrupt wdt)
Some application lock interrupt(portENTER_CRITICAL) too long time,
it will cause bluetooth cannot react interrupt in time, then t will
cause some assert, assert info following:
1. ld_acl.c 1900
2. ld_fm.c 340
3. other assert reference to this.
2018-03-28 12:04:16 +08:00
Angus Gratton 4507b3fde6 adc: Add doc details about configure not needed before each read 2018-03-28 11:52:41 +11:00
Tian Hao 4b1ef083ee component/bt : add bluetooth controller library compile version 2018-03-27 16:35:00 +08:00
Ivan Grokhotkov 2935e958fc Merge branch 'bugfix/adc2_cct' into 'master'
fix(adc2): fix cct and xpd configurations to improve precision of ADCs

See merge request idf/esp-idf!2020
2018-03-27 16:23:43 +08:00
Jiang Jiang Jian 3eb43c9ece Merge branch 'bugfix/no_link_key_notify_on_repairing' into 'master'
component/bt: bugfix for no link key notification event on repairing

See merge request idf/esp-idf!2118
2018-03-27 14:51:25 +08:00
Roland Dobai 7c4b3d50f8 Make error codes globally unique 2018-03-27 08:12:54 +02:00
Ivan Grokhotkov 892f3907fa Merge branch 'bugfix/i2c_ack_error_bug' into 'master'
driver(i2c):  Fixed i2c interrupt wdt timeout bug

See merge request idf/esp-idf!2049
2018-03-27 12:29:23 +08:00
Ivan Grokhotkov b007b89b84 soc/io_mux: make CLK_OUT fields compatible with REG_SET/GET_FIELD 2018-03-27 12:10:18 +08:00
Ivan Grokhotkov 2e7613b656 Merge branch 'feature/use_esp_err_to_name' into 'master'
Use esp_err_to_name in examples & optionally disable it in Kconfig

See merge request idf/esp-idf!2013
2018-03-27 11:50:21 +08:00
Ivan Grokhotkov 9d69d11067 Merge branch 'feature/spi_dummy_bit' into 'master'
feat(spi_master): allow output high speed data when dummy bits are not used.

See merge request idf/esp-idf!2113
2018-03-27 11:28:58 +08:00
wangmengyang fd8c484b33 component/bt: bugfix for no link key notification event on repairing for initiating side of simple pairing
In response to: https://github.com/espressif/esp-idf/issues/1275
2018-03-27 11:22:47 +08:00
Ivan Grokhotkov db44a719fb pm: add unit test for configuration changes 2018-03-27 11:20:55 +08:00
Ivan Grokhotkov 94014a9a51 pm: handle the case of 2MHz frequency
It is not possible to generate 1 MHz REF_TICK from 2 MHz APB clock
(this is a limitation of REF_TICK divider circuit). Since switching
REF_TICK frequency is something we would like to avoid (to maintain
UART output even with DFS), 2 MHz frequency has been marked as
unsupported.
2018-03-27 11:20:55 +08:00
Ivan Grokhotkov 839c665c92 pm: fix initialisation only done in dual core mode
Introduced in 9377d4ac. Accidentally put the new code block under an
2018-03-27 11:20:54 +08:00