Commit graph

801 commits

Author SHA1 Message Date
Mark Webb-Johnson
5ae2c0d0ff Incorrect use of #ifdef in component.mk causes bootloader build flags for esp32 component, even for app builds 2017-11-29 08:52:26 +08:00
XiaXiaotian
11613ba7a7 fix an airkiss typo error 2017-11-15 14:10:04 +08:00
Ivan Grokhotkov
5af843f61b Merge branch 'bugfix/v2.1_rtc_bias_and_restart' into 'release/v2.1'
Cherry-pick: increase core voltage for 80M flash, esp_restart fix

See merge request !1512
2017-11-09 21:09:40 +08:00
Jiang Jiang Jian
a237327eff Merge branch 'feature/tw16227_add_fix_rate_api_2.1' into 'release/v2.1'
esp32: add fix rate api

See merge request !1509
2017-11-09 18:47:09 +08:00
Ivan Grokhotkov
e324707cc8 esp_restart: fix possible race while stalling other CPU, enable WDT early
Previously esp_restart would stall the other CPU before enabling RTC_WDT.
If the other CPU was executing an s32c1i instruction, the lock signal
from CPU to the arbiter would still be held after CPU was stalled. If
the CPU running esp_restart would then try to access the same locked
memory pool, it would be stuck, because lock signal would never be
released.

With this change, esp_restart resets the other CPU before stalling it.
Ideally, we would want to reset the CPU and keep it in reset, but the
hardware doesn't have such feature for PRO_CPU (it is possible to hold
APP_CPU in reset using DPORT register). Given that ROM code will not use
s32c1i in the first few hundred cycles, doing reset and then stall seems
to be safe.

In addition to than, RTC_WDT initialization is moved to the beginning of
the function, to prevent possible lock-up if CPU stalling still has any
issue.
2017-11-09 16:05:35 +08:00
Liu Zhi Fu
dfb1c41a28 esp32: add fix rate api
Add hidden fix rate api
2017-11-09 10:06:19 +08:00
Wangjialin
305e2695d6 bugfix(80m flash): cherry pick from idf3.0, add gpio config and vddsdio config
1. raise vddsdio for 1.8v flash
2. gpio matrix config for flash
3. fix esp_restart function

todo:
to decide whether to raise core voltage
to test deep-sleep current
2017-11-08 12:50:08 +08:00
XiaXiaotian
4aa6551fe0 Fix a problem which initialize current can reach 800mA. 2017-11-02 11:02:38 +08:00
XiaXiaotian
e5b75b4a17 fix the bug that fail to reconnect to some APs 2017-10-20 11:52:53 +08:00
Tian Hao
3a9781ff45 component/esp32 : remove phy init data description 2017-10-17 11:28:35 +08:00
Tian Hao
edbd744991 component/esp32 : update rtc phy lib
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-16 18:00:56 +08:00
Jiang Jiang Jian
a73c78a85b Merge branch 'bugfix/backport_to_2.1' into 'release/v2.1'
Backport several bug fixes to 2.1 branch

See merge request !1318
2017-10-11 16:56:22 +08:00
Jiang Jiang Jian
84413f641d Merge branch 'bugfix/btdm_ea_overload_for_rel_v2.1' into 'release/v2.1'
component/bt: update bluetooth library to increase programming delay in EA

See merge request !1344
2017-10-11 16:52:18 +08:00
wangmengyang
0c75b6e6e6 component/bt: update bluetooth library to increase programming delay in EA 2017-09-30 18:40:49 +08:00
XiaXiaotian
62c2c37606 Fix a wpa and wpa2 bug 2017-09-30 15:51:33 +08:00
Jeroen Domburg
fdb390aeac Place uart_tx_wait_idle in IRAM 2017-09-26 00:02:20 +08:00
XiaXiaotian
cf185846f5 fix set locked channel typo of smartconfig 2017-08-25 16:25:03 +08:00
Ivan Grokhotkov
b7f7a92c5d esp32: by default, set 40MHz crystal frequency 2017-08-23 16:39:22 +08:00
Ivan Grokhotkov
efdbc63b5f Merge branch 'cherry-pick-292c2abd' into 'release/v2.1'
Merge branch 'bugfix/init_nvs_in_bluetooth' into 'master'

See merge request !1031
2017-07-23 14:35:33 +08:00
Ivan Grokhotkov
8fc78a958a Merge branch 'bugfix/init_nvs_in_bluetooth' into 'master'
bt: call nvs_flash_init in examples, show error if NVS is not initialized

See merge request !1003
2017-07-20 14:26:14 +08:00
XiaXiaotian
5d1ec0da02 Fix the bug that scan assert in non sleep mode. 2017-07-19 14:12:14 +08:00
Liu Zhi Fu
305564cd59 esp32: udpate wifi lib to make low rate work
Make low rate feature work
2017-07-07 22:47:39 +08:00
Ivan Grokhotkov
abec2392c7 esp_chip_info: populate ‘model’ field 2017-07-06 14:29:30 +08:00
Ivan Grokhotkov
494641c481 phy_init: fix log level for "PHY data partition validated" message 2017-07-06 14:29:08 +08:00
Angus Gratton
c40bbc5c42 ipc task: Allow configuration of IPC task stack size
Fixes regression in 3fe0022ef
2017-07-04 15:30:04 +08:00
Angus Gratton
1b3120615b stack sizes: Revert stack size increases added in 8d43859
Set min stack size to 2048 if AppTrace support is enabled, 512 bytes otherwise.
2017-07-04 15:29:33 +08:00
Angus Gratton
3365b9322b dport_access: Fix spurious warning in unicore mode, refactor 2017-07-04 15:27:31 +08:00
Jiang Jiang Jian
1480251aa7 Merge branch 'bugfix/spiflash_rom_symbols' into 'master'
spiflash rom: Add symbols accidentally removed in refactor

See merge request !804
2017-06-23 15:24:04 +08:00
Ivan Grokhotkov
85baf0afaa Merge branch 'buxfix/panic_handler_not_halting_cpu' into 'master'
Panic Handler not halting when running on both cores

See merge request !903
2017-06-23 11:34:03 +08:00
XiaXiaotian
8411aa7362 Fix the bug that lora vendor size was not added to probe response.
Restore priority of tasks in wifi lib.
2017-06-22 15:06:58 +08:00
Darian Leung
21f02a6955 Bugfix - Panic Handler not halting when running on both cores
Bug occurs when core dump destination in menuconfig is set to flash. When
programme crashes, xt_unhandled_exception or panicHandler will both trigger
commonErrorHandler. commonErrorHandler calls esp_core_dump_to_flash which
will attempt to use DPORT functions and hang due to trying to a stall and already
stalled processor (already stalled in xt_unhandled_exception and panicHandler).
Program will eventually be rebooted when wdt expires.

Added esp_dport_access_int_deinit after calls to haltOtherCore() so that DPORT
functions don't try to halt and already halted cpu hence preventing hang.

Fixes TW#12944 https://github.com/espressif/esp-idf/issues/646
2017-06-21 16:58:48 +08:00
Liu Zhi Fu
59479eb7dd esp32: update wifi lib to fix a wifi connect issue
Fix WiFi fails to connect TP842N bug
2017-06-19 21:23:24 +08:00
Jiang Jiang Jian
07ccbb8dbc Merge branch 'bugfix/rtc_time_issues' into 'master'
Fixes for RTC time issues

See merge request !849
2017-06-16 15:29:56 +08:00
Jiang Jiang Jian
7c50916c53 Merge branch 'bugfix/phy_init_procedure' into 'master'
component/esp32 : fix phy init with NULL init_data

See merge request !879
2017-06-16 15:03:03 +08:00
Tian Hao
bb4a87dbfe component/esp32 : fix phy init with NULL init_data
1. fix phy init with NULL init_data
2. do full calibration without CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE
3. fix libphy.a printf
2017-06-16 12:09:13 +08:00
Ivan Grokhotkov
8ccb2a4990 esp32: make time monotonic across resets
Small changes to clock calibration value will cause increasing errors
the longer the device runs. Consider the case of deep sleep, assuming
that RTC counter is used for timekeeping:
- before sleep:
   time_before = rtc_counter * calibration_val
- after sleep:
   time_after = (rtc_counter + sleep_count) * (calibration_val + epsilon)
where 'epsilon' is a small estimation error of 'calibration_val'.
The apparent sleep duration thus will be:
time_after - time_before = sleep_count * (calibration_val + epsilon)
                           + rtc_counter * epsilon

Second term on the right hand side is the error in time difference
estimation, it is proportional to the total system runtime (rtc_counter).

To avoid this issue, this change makes RTC_SLOW_CLK calibration value
persistent across restarts. This allows the calibration value update to
be preformed, while keeping time after update same as before the update.
2017-06-16 12:06:04 +08:00
Jiang Jiang Jian
a64f5de091 Merge branch 'bugfix/sw_reset_fixes' into 'master'
Fixes for esp_restart

See merge request !865
2017-06-15 22:10:13 +08:00
Tian Hao
09f7cf45dd component/bt : fix interrupt number conflict
1. the typical problem is when push keyboard on serial tool, the bluetooth may stop.
2017-06-15 19:41:54 +08:00
Ivan Grokhotkov
8cb0d52c43 esp_system: remove link time dependency on WiFi stack
- esp_restart will not pull in WiFi stack (if it is not used otherwise)
- esp_restore is moved into a separate file to break link time
  dependency
2017-06-15 18:15:36 +08:00
Ivan Grokhotkov
9353666cc1 esp32: reset APP CPU when doing esp_restart
This fixes a bug introduced by !848, where APP CPU would not be reset
during esp_restart, if esp_restart was called from a task running on APP
CPU, and wouldn’t be reset by PRO CPU on startup.
This change replaces stalling APP CPU with resetting it.

Also adds a non-automated esp_restart tests.
2017-06-15 18:15:35 +08:00
Ivan Grokhotkov
a72b1abc51 esp32: disable DPORT access protection when doing esp_restart
DPORT access protection can not work when the other CPU is stalled.
Writes to DPORT registers in esp_restart caused the program to hang due
to access protection, and the reset happened due to RTC_WDT, not SW_RST.
This change adds esp_dport_access_int_deinit function and calls it from
esp_restart once the other core is stalled.
2017-06-15 18:15:35 +08:00
XiaXiaotian
435b907475 fix the bug that wifi assert at ieee80211_output.c line 733 2017-06-14 21:20:28 +08:00
Jiang Jiang Jian
db87a640ea Merge branch 'feature/optimize_task_priority_in_wifi_lib' into 'master'
Optimize priorities of pp, pm, timer, wps and wpa2 tasks.

See merge request !861
2017-06-14 14:01:53 +08:00
Angus Gratton
8e0ec6a9ab Merge branch 'bugfix/abort_in_interrupt_context' into 'master'
Panic handler backtrace fixes

See merge request !835
2017-06-14 13:45:36 +08:00
XiaXiaotian
28e84a5299 Optimize priorities of pp, pm, timer, wps and wpa2 tasks. 2017-06-14 11:06:57 +08:00
Jiang Jiang Jian
69e8085624 Merge branch 'bugfix/wps_receive_m2d_fail_process' into 'master'
ESP32: Add error wps fail reason

See merge request !855
2017-06-14 10:57:59 +08:00
Ivan Grokhotkov
6e704fc421 Merge branch 'bugifx/cplusplus_guards' into 'master'
add C++ include guards to header files which are missing them

See merge request !799
2017-06-14 09:14:02 +08:00
Ivan Grokhotkov
71d7716a45 Merge branch 'bugfix/esp_event_send_init_check' into 'master'
esp_event_send: check if the event loop is initialized

See merge request !817
2017-06-14 09:11:50 +08:00
Angus Gratton
5d7bffea2b panic handler: Print backtraces with calling address not return address
This seems to clean up some of the more wrong addr2line output results (not
sure why, something to do with optimisations I think - perhaps the return
address may also be a jump target from some earlier line of the code.)
2017-06-14 10:30:04 +10:00
Deng Xin
3d963f1c61 Merge branch bugfix/wps_receive_m2d_fail_process to master
ESP32: Add error wps fail reason enum in esp_event.h
see merge request !226
2017-06-13 21:48:48 +08:00