Commit graph

1458 commits

Author SHA1 Message Date
Tian Hao f6de7ea764 component/bt : cleanup status and spell check 2016-11-28 22:40:30 +08:00
Tian Hao 9d9e758756 component/bt : add comment for doxygen
1. use doxygen check api comment
2016-11-28 21:59:04 +08:00
Wu Jian Gang b9c678f713 Merge branch 'feature/merge_some_misc_changes' into 'master'
esp32/lwip: some misc changes

1. Update phy to fix HT40 rx issue
2. Add code about RX_DONE/TX_DONE/Lock-free optimization
3. Fix wifi ioctl return value error
4. Add lwip statistics debug code
5. Modify TCP window size to 10 and send buffer size to 5

See merge request !257
2016-11-28 20:27:29 +08:00
Liu Zhi Fu 5b4361f60a esp32: update wifi lib to add tw8913 fix
dfe73737 - tw8913 wakeup first before scan
2016-11-28 20:11:43 +08:00
Liu Zhi Fu fc2883a59a lwip: modify according code review
1. Modify tcp window size/send buffer back to 4/2
2. Disable lwip statistics by default
2016-11-28 19:54:22 +08:00
Liu Zhi Fu 9a3f9af2db esp32/lwip: some misc changes
1. Update phy to fix HT40 rx issue
2. Add code about RX_DONE/TX_DONE/Lock-free optimization
3. Fix wifi ioctl return value error
4. Add lwip statistics debug code
5. Modify TCP window size to 10 and send buffer size to 5
2016-11-28 18:36:14 +08:00
Tian Zhong Xing 72422b32dc feature/fota_ops_api: add ota core api implement 2016-11-28 17:12:57 +08:00
Tian Hao fd0d28afc3 component/bt : cleanup some missing code 2016-11-28 16:39:53 +08:00
Tian Hao ff8ce12787 component/bt : cleanup the spell && redundant 2016-11-28 14:58:30 +08:00
Tian Hao 1173106a20 component/bt : change task to decease dram(heap)
1. decrease the task size(HCI cannot < 1024, btu cannot < 4096)
2. btc task can config by menuconfig(default 2048)
2016-11-25 23:37:46 +08:00
Tian Hao c9a0b9a45c component/bt : decrese dram
1. decrease some resource
2016-11-25 21:24:16 +08:00
Wu Jian Gang db1e86b3d9 Merge branch 'feature/modem_sleep' into 'master'
Feature/modem sleep



See merge request !251
2016-11-25 19:32:03 +08:00
Xia Xiaotian 55aa82f814 modem sleep: update wifi lib
1. add libwpa2.a
2016-11-25 19:06:52 +08:00
Wu Jian Gang 3f27c09728 Merge branch 'feature/wpa2_enterprise' into 'master'
Feature/wpa2 enterprise



See merge request !250
2016-11-25 18:46:29 +08:00
Xia Xiaotian 6e3b7f4ea2 wpa2 enterprise: change wpa2 enterprise APIs to esp_wifi_sta_wpa2_ent_XXX 2016-11-25 18:08:21 +08:00
Xia Xiaotian 73f4e8b2af wpa2 enterprise: change the type macro to platform default macro ESP_PLATFORM. 2016-11-25 16:56:09 +08:00
Angus Gratton 88b264cfce mbedTLS SHA: Fix cloning of SHA-384 digests
Hardware unit only reads 384 bits of state for SHA-384 LOAD,
which is enough for final digest but not enough if you plan to
resume digest in software.
2016-11-25 19:26:30 +11:00
Angus Gratton a902e2a9de mbedtls tests: Add additional MPI (bignum), SHA tests 2016-11-25 19:21:49 +11:00
Tian Hao ac87ddfb05 component/bt : close sdp to free dram
1. free 15K
2016-11-25 15:54:18 +08:00
Xia Xiaotian 16f2b119eb Merge branch 'master' into feature/modem_sleep
Conflicts:
	components/esp32/lib
2016-11-25 15:54:00 +08:00
Wu Jian Gang 7f2c6a9d80 Merge branch 'bugfix/tw8770_fix_socket_memory_leak' into 'master'
lwip: fix socket memory leak issue

1. Add socket memory leak debug counter
2. Fix TCP PCB leak issue
    Currently ESP32 support maximum 16 TCP PCBs and all TCP PCB are allocated from heap memory. In some scenario, we may
    have memory leak issue,  for example, the application already created 16 TCP PCB, then it close 5 of them, because the TCP
    state machine, the LWIP core may not free all the 5 TCP PCB immediately, maybe some is in TIME_WAIT status, some is in 
    FIN_WAIT_1 etc. Then the application try to malloc 17th TCP PCB (the application think they just create 12 because they already
    close 5), memp_malloc() will return true because the heap is not out of memory, but actually we got 17 TCP PCB. When the 
    scenario repeat again and again (in our Audio application, it repeat more than 10000 times), more and more TCP PCB will be
    created in the system, each TCP PCB require 200B, then memory leak happen (In Audio application, I saw more than 26 TCP PCB
    are created, and 10*200=2K memory are leaked).

See merge request !223
2016-11-25 13:44:02 +08:00
Xia Xiaotian 1818af1c3e wpa2 enterprise: update wifi lib and add wpa2_printf 2016-11-25 13:26:30 +08:00
Xia Xiaotian 0dbc11e37d wpa2 enterprise: update wpa2 enterprise API comments 2016-11-25 11:03:33 +08:00
Wang Jia Lin 58d902eb78 Merge branch 'driver_merge_tmp/merge_timer' into 'master'
driver: timer

1. add timer driver code
2. add timer example code
3. replace api for enable interrupt in task_wdt.c

See merge request !237
2016-11-25 10:52:40 +08:00
Angus Gratton d0801fdbab Merge branch 'feature/sha_tls_integration' into 'master'
SHA acceleration integrated to mbedTLS incl. TLS sessions

Uses hardware SHA acceleration where available, fails over to software where not available.

Ref TW7112

See merge request !232
2016-11-25 10:12:29 +08:00
Angus Gratton 9f9d92b2df Merge branch 'bugfix/spi_flash_region' into 'master'
spi_flash_erase_range: Allow for 32KB blocks not 64KB blocks

SPI flash hardware sends 52h command, which is a 32KB erase.

There is a matching bug in the ROM SPIEraseArea code, unless
flashchip->block_size is modified first.

See merge request !249
2016-11-25 10:11:51 +08:00
Angus Gratton 7a93422089 Merge branch 'bugfix/ledc_divider' into 'master'
ledc: fix reported error when div_param == 256

Whenever bit_num and freq_hz are such that div_param == 256, the code would flag that as an error.
In fact, value 256 of div_param was a valid one (HW requires that div_param >= 1.0, when interpreted as a Q10.8 fixed point value).

Changed the if statements a bit to make the logic clearer, and added more descriptive error messages.

Also added missing error for the unimplemented case of low speed mode.

Reported in https://github.com/igrr/esp32-cam-demo/issues/2

See merge request !247
2016-11-25 10:11:33 +08:00
Jeroen Domburg 7dc322273c Merge branch 'bugfix/ringbuffer_item_return_bug_report_from_chunguang' into 'master'
bugfix: ringbuffer return item api

Report from chunguang, vRingbufferReturnItem should not call portENTER_CRITICAL_ISR

See merge request !246
2016-11-25 09:31:20 +08:00
Tian Hao 19273c7b2d component/bt : run astyle handle the code files 2016-11-25 02:10:15 +08:00
Tian Hao d7eb709a9c component/bt : add license header 2016-11-25 01:58:26 +08:00
Wangjialin a5ad8090cf Merge branch 'master' into driver_merge_tmp/merge_timer
# Conflicts:
#	docs/index.rst
2016-11-25 01:07:19 +08:00
Wang Jia Lin 35ae2cd1a5 Merge branch 'driver_merge_tmp/merge_pcnt' into 'master'
driver: PCNT

1. add PCNT module in periph_ctrl.c/.h
2. add description of PCNT status in pcnt_struct.h
3. add PCNT driver code
4. add PCNT example code.

See merge request !229
2016-11-25 00:41:16 +08:00
Ivan Grokhotkov 5eb2d16acd Merge branch 'bugfix/uart_argument_names' into 'master'
uart: use same argument names in get/set functions

This one is pretty trivial: rename arguments so that same name is used for get and set functions.

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

See merge request !248
2016-11-24 23:56:35 +08:00
Liu Zhi Fu 340b14f0b7 esp32: update wifi lib to contain bt/wifi coexist code 2016-11-24 21:37:46 +08:00
Xia Xiaotian 1cdd082a9e wpa2 enterprise: update wifi lib in master branch 2016-11-24 20:41:44 +08:00
Tian Hao 160e81e901 example : cleanup the order 2016-11-24 20:20:59 +08:00
Tian Hao b5f03a36d5 component/bt : fix sw coexit call mistake 2016-11-24 20:09:52 +08:00
Tian Hao 55e0690f69 component/bt : wifi/bt software coexist option
1. option of sw coexist
2. cpu set freq function modify
3. update lib
4. ld add static data address
2016-11-24 19:57:47 +08:00
Xia Xiaotian 4ea18083f7 wpa2 enterprise: add wifi lib 2016-11-24 19:46:37 +08:00
Xia Xiaotian b649b48eae Merge branch 'master' into feature/wpa2_enterprise
add lib
2016-11-24 19:35:30 +08:00
Ivan Grokhotkov c17ee8a914 Merge branch 'bugfix/unit_test_run' into 'master' 2016-11-24 18:29:32 +08:00
Ivan Grokhotkov 1bcd90d45d Merge branch 'feature/system_apis' into 'master'
system_* APIs cleanup

This changeset is mostly about cleaning up `system_*` APIs and moving them from libcore. It has dragged a few more changes along, however.

- `system_deep_sleep` deprecated, new name is `esp_deep_sleep`
- `system_efuse_read_mac` deprecated, new name is `esp_efuse_read_mac`
- `system_read/write_rtc_mem` removed (reason: we use linker to place code/data into RTC memory now)
- `system_get_sdk_version` deprecated. Returns "master" for now. Support for compile-time and runtime version detection will be done in a separate MR.
- `system_get_time` and variations have been deprecated. `gettimeofday` should be used instead.
- `system_restart` deprecated, new name is `esp_restart`. Rewritten code to work correctly from any of the cores.
- `system_restore` deprecated, `esp_wifi_restore` should be used instead.
- `system_get_rst_info` removed (it wasn't in a header file)
- RTC library has been updated to latest version
- Logging output from `libfoo.a` goes through `foo_printf` function now, where `foo ` is any of the library names. For libraries other than rtc and phy, this is a temporary measure, until we finish switching to esp_log library and clean up all uses of printf/ets_printf.
- ESP-IDF build will fail if any of the libraries have printf/ets_printf reference.
-  Added `esp_random` function which gets values from HW RNG. I have added code which makes sure the value is not polled too often (allows at least 16 APB cycles). Also added a header file for HW RNG (just one register).
- Moved random number generation functions used by wpa library into wpa_supplicant component.

See merge request !234
2016-11-24 18:22:50 +08:00
Xia Xiaotian 422e95db9c system_apis: update wifi lib and librtc.a
1. some refractor to debug info in wifi lib(da6280b3)

2. fix bug of hung at phy_int in librtc.a(1bb9ce1d)
2016-11-24 17:55:37 +08:00
Tian Hao 7a41ab6982 Merge branch 'master' into feature/btdm_bluedroid
1. update bt lib submodule

# Conflicts:
#	components/bootloader/src/main/esp32.bootloader.ld
#	components/bt/component.mk
#	components/esp32/component.mk
#	components/esp32/lib
2016-11-24 15:45:04 +08:00
Tian Hao e5ceddabac component/bt : change gatt client callback param
1. change the array to point to decrease the memory occupy
2. change the sendindconfirm position
3. fix union lost
2016-11-24 15:17:49 +08:00
Angus Gratton be53a6950c spi_flash_erase_range: Allow for 32KB blocks not 64KB blocks
SPI flash hardware sends 52h command, which is a 32KB erase.

There is a matching bug in the ROM SPIEraseArea code, unless
flashchip->block_size is modified first.
2016-11-24 18:05:06 +11:00
Ivan Grokhotkov 79482bbee7 uart: use same argument names in get/set functions
https://github.com/espressif/esp-idf/issues/105
2016-11-24 13:56:18 +08:00
Ivan Grokhotkov f60e54497c ledc: fix reported error when div_param == 256
Whenever bit_num and freq_hz are such that div_param == 256, the code would flag that as an error.
In fact, value 256 of div_param was a valid one (HW requires that div_param >= 1.0, when interpreted as a Q10.8 fixed point value).
Changed the if statements a bit to make the logic clearer, and added more descriptive error messages.
Also added missing error for the unimplemented case of low speed mode.
2016-11-24 12:27:32 +08:00
Angus Gratton 7e433ae3f4 Merge branch 'bugfix/uart_isr_rodata' into 'master'
UART driver: Fix crash in ISR due to "UART" static array moved to flash

Ref: http://esp32.com/viewtopic.php?f=13&t=546&sid=76ff371ae2b259441a2cf355e96d74b9#p2275

This is a really subtle bug, gcc noticed the UART array elements are read-only so
implicitly moved the elements to .rodata as if it was const. However
this array is accessed from the UART ISR, so has to be in IRAM or DRAM.

See merge request !245
2016-11-24 12:09:46 +08:00
Angus Gratton 3b937c5ef8 Merge branch 'bugfix/rmt_includes' into 'master'
Fix inclusion of stdlib.h

Refs:
http://esp32.com/viewtopic.php?f=13&t=550
http://esp32.com/viewtopic.php?f=13&t=551
    
rmt.c should include stdlib.h for malloc, esp_bignum,c & https_request_main.c should include it for abort().
    
FreeRTOSConfig.h is only including stdlib if CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION is set. However, it is included for abort() so needs to be included whenever CONFIG_FREERTOS_ASSERT_FAIL_ABORT is set.
    
This change includes it unconditionally in FreeRTOSConfig.h. This is to avoid this kind of bug where compiler errors are dependent on config. I suggest we don't change this to be more selective until we have 'make randomconfig' style tests in CI.


See merge request !244
2016-11-24 12:09:19 +08:00