Commit graph

614 commits

Author SHA1 Message Date
Michael (XIAO Xufeng) 0ec08ca21b sdio_slave: support HAL layer 2019-12-13 18:33:15 +08:00
Wang Jia Lin f5e60524ac Merge branch 'bugfix/fix_i2c_driver_breakingchange_issue' into 'master'
bugfix(i2c): fix I2C driver breaking change issue

See merge request espressif/esp-idf!6809
2019-12-06 16:50:16 +08:00
houwenxiang aac935ec81 bugfix(i2c): fix I2C driver breaking change issue.
1. Fixed I2C driver breaking change issue.
    2. Add I2C UT test case.
2019-12-04 15:51:36 +08:00
houwenxiang e4230d11ca bugfix(UART): fix uart driver spinlock misused bug
1. fix uart driver spinlock misused bug
    2. add uart driver ut test case
    3. undo the change in light_sleep_example_main.c
2019-12-03 16:06:31 +08:00
Wang Jia Lin 1ffcb54444 Merge branch 'bugfix/fix_esp32-s2_rtc_io_issue' into 'master'
bugfix(gpio): fix esp32 s2 rtc io issue and gpio testcase issues

See merge request espressif/esp-idf!6832
2019-12-03 11:17:41 +08:00
Renz Christian Bagaporo e6ad330018 ble_mesh_wifi_coexist example: Disable Wi-Fi RX IRAM optimisation
Otherwise IRAM usage is too high in this example.
2019-11-28 09:20:00 +08:00
Fu Zhi Bo 3a468a1ffd Refactor the touch sensor driver 2019-11-27 20:08:44 +08:00
xiongyu af4c455417 bugfix(gpio):fix esp32 s2 rtc io issue
* Modify the function implementation of ESP32-S2 RTC GPIO
  On ESP32 those PADs which have RTC functions must set pullup/down/capability via RTC register.
  On ESP32-S2, Digital IOs have their own registers to control pullup/down/capability, independent with RTC registers.
* Add ESP32-S2 support of unit test
* Modify the pull-up test of unit test
* Modify the interrupt test of unit test
* Modify input and output mode test of unit test
2019-11-27 17:18:20 +08:00
Angus Gratton 91b7a7beaf Merge branch 'bugfix/timer_intr_status_get' into 'master'
bugfix(timer): fix get intr status function

See merge request espressif/esp-idf!6807
2019-11-27 09:13:16 +08:00
Angus Gratton 64c8b640a1 Merge branch 'feature/log_component_noos' into 'master'
log: make compatible with non-OS builds

See merge request espressif/esp-idf!6787
2019-11-27 08:34:22 +08:00
chenjianqiang bcfe684951 bugfix(timer): add a macro to control making the XTAL related functions 2019-11-26 12:39:46 +00:00
chenjianqiang 856d9f7d89 bugfix(timer): recover get raw interrupt status function 2019-11-26 12:39:46 +00:00
houwenxiang f27ae9b0e2 feature: Add uart hal support. 2019-11-26 20:01:50 +08:00
kooho f0f20e0496 bugfix(i2c): fix esp32-s2 i2c driver UT issue 2019-11-26 12:01:18 +08:00
Angus Gratton f2a1a6105a Merge branch 'feat/mcpwm_hal'
Manual merge of !6626
2019-11-25 17:18:48 +11:00
Angus Gratton 6dd36fd571 Merge branch 'refactor/hal_gpio_driver'
Manual merge of !5597
2019-11-25 10:49:40 +11:00
Angus Gratton f34edba8f3 Merge branch 'feature/adc_driver_hal_support'
Manual merge of !6044
2019-11-25 10:22:06 +11:00
michael 538540ce21 mcpwm: add HAL layer support
Also improved the unit tests a bit.
2019-11-25 00:36:30 +08:00
xiongyu a3b79e9202 refactor(gpio): add hal gpio driver 2019-11-22 17:24:53 +08:00
fuzhibo f49b192a5e refactor the adc driver 2019-11-22 15:42:16 +08:00
Mahavir Jain 25c0752682 i2s: fix regression in retrieval of chip revision causing apll test to fail 2019-11-22 11:46:38 +05:30
Wang Jia Lin a8d3e3ab4a Merge branch 'feature/dac_driver_hal_support' into 'master'
dac: add hal for dac driver

See merge request espressif/esp-idf!5591
2019-11-22 13:59:32 +08:00
fuzhibo 03ac1aaafd dac: refactor driver add hal 2019-11-22 11:44:46 +08:00
Angus Gratton 0e0994092e Merge branch 'feature/esp32s2beta_fix_rtc_peripheral_driver' into 'master'
Driver: fix touch driver and deep sleep example

See merge request espressif/esp-idf!6476
2019-11-22 11:39:41 +08:00
Ivan Grokhotkov 951ed739f7 soc/cpu: add non-xtensa-specific replacement of xthal_get_ccount 2019-11-21 19:22:35 +01:00
houwenxiang 28286183d1 feature(I2C): Add i2c hal support. 2019-11-21 20:34:07 +08:00
fuzhibo 246242dbd5 driver: fix sens_struct.h;
driver: fix timer wakeup dsleep;
example: fix EXT1 wakeup dsleep;
example: fix touch pad wakeup dsleep;
2019-11-21 20:31:34 +08:00
chenjianqiang 857dec108d feat(ledc): refactor ledc driver
1. add hal and low-level layer for ledc driver
2. support esp32s2beta ledc
2019-11-21 16:25:22 +08:00
chenjianqiang 9f9da9ec96 feat(timer): refator timer group driver
1. add hal and low-level layer for timer group
2. add callback functions to handle interrupt
3. add timer deinit function
4. add timer spinlock take function
2019-11-21 14:14:19 +08:00
xiongyu e62b831867 refactor(sigmadelta): add hal sigmadelta driver 2019-11-21 11:53:07 +08:00
fuzhibo 0c2bf7c8bc rtcio: add hal for driver 2019-11-21 10:40:49 +08:00
Angus Gratton b30b0e59fa Merge branch 'feature/add_rmt_hal' into 'master'
rmt: add hal layer and new examples

Closes IDF-841, IDF-844, and IDF-857

See merge request espressif/esp-idf!5649
2019-11-21 09:53:54 +08:00
Angus Gratton 95b9b41258 Merge branch 'bugfix/ethernet_add_reference_counter' into 'master'
ethernet: add reference counter for mac and phy && add gpio config outof Kconfig

Closes IDF-1056

See merge request espressif/esp-idf!6682
2019-11-21 06:58:13 +08:00
Wang Jia Lin f9d5b67b81 Merge branch 'refactor/hal_i2s_driver' into 'master'
refactor(i2s): add hal i2s driver

Closes IDFGH-2097

See merge request espressif/esp-idf!5601
2019-11-20 17:45:21 +08:00
morris 8fd8695ea1 rmt: add HAL layer 2019-11-20 10:54:21 +08:00
suda-morris 05d71319de ethernet: add gpio number into config structure 2019-11-20 10:36:45 +08:00
Anton Maklakov bd49b3f315 Merge branch 'bugfix/soc_missing_tests' into 'master'
soc: fix unit tests not included in the build

See merge request espressif/esp-idf!6723
2019-11-20 00:32:43 +08:00
xiongyu 8c76a3c10d refactor(i2s): add hal i2s driver 2019-11-19 22:19:19 +08:00
Anton Maklakov f04e45b340 soc: remove invalid esp32s2beta tests
Need to update them later, ref: IDF-1169
2019-11-18 16:05:37 +07:00
Anton Maklakov 7b0be33a7a soc: fix unit tests not included in the build
Regression from 9eccd7c082
2019-11-18 15:58:49 +07:00
xiongyu b1a72866ca refactor(pcnt): add hal pcnt driver 2019-11-18 14:35:46 +08:00
KonstantinKondrashov e3ff160733 soc/esp32: Add test_env for 32kHz XTAL unit tests 2019-10-31 13:23:47 +08:00
KonstantinKondrashov f9e0e3557f soc/esp32s2beta: Add test_env for 32kHz XTAL unit tests 2019-10-31 13:23:47 +08:00
Angus Gratton 8675a818f9 Merge branch 'master' into feature/esp32s2beta_merge 2019-10-22 13:51:49 +11:00
Ivan Grokhotkov c7d8ef52ca Merge branch 'fix/esp_flash_no_qe' into 'master'
esp_flash: fix the QE write issue in high freq, and support UT for external chips

Closes IDF-888

See merge request espressif/esp-idf!5736
2019-10-20 13:59:30 +08:00
Angus Gratton ae21d669b9 Merge branch 'master' into feature/esp32s2beta_merge 2019-10-17 18:22:08 +11:00
Darian 820fd6447d can: Add support for lower bit rates
This commit adds support for lower bit rates in the CAN Driver for
ESP32 Rev 2 or later chips.
2019-10-17 12:33:17 +08:00
Angus Gratton f5238d5e42 Merge branch 'feature/esp32s2beta' into feature/esp32s2beta_merge 2019-10-15 15:03:45 +11:00
Angus Gratton 496ede9bcd Merge branch 'master' into feature/esp32s2beta_merge 2019-10-15 14:59:27 +11:00
Michael (XIAO Xufeng) 15d311bb80 esp_flash: rename internal variables for better readability
chip_drv in HAL are renamed as host
2019-10-14 17:25:58 +08:00
Michael (XIAO Xufeng) 571864e8ae esp_flash: fix set qe bit and write command issues
There used to be dummy phase before out phase in common command
transactions. This corrupts the data.

The code before never actually operate (clear) the QE bit, once it finds
the QE bit is set. It's hard to check whether the QE set/disable
functions work well.

This commit:

1. Cancel the dummy phase

2. Set and clear the QE bit according to chip settings, allowing tests
   for QE bits. However for some chips (Winbond for example), it's not
   forced to clear the QE bit if not able to.

3. Also refactor to allow chip_generic and other chips to share the same
   code to read and write qe bit; let common command and read command share
   configure_host_io_mode.

4. Rename read mode to io mode since maybe we will write data with quad
   mode one day.
2019-10-14 17:25:58 +08:00
suda-morris 13c128fd31 Ethernet: optimize and bugfix
1. simplify deallocate in esp_eth_mac_new_esp32, esp_eth_mac_new_dm9051
2. remove blocking operation in os timer callback
3. check buffer size in ethernet receive function
2019-10-11 12:15:17 +08:00
Angus Gratton 8c1f3cb6b2 Merge branch 'feature/esp32s2beta_isr_table' into 'feature/esp32s2beta'
soc: Add interrupt numbers mapping for esp32s2beta

See merge request espressif/esp-idf!6204
2019-10-08 12:45:26 +08:00
Ivan Grokhotkov 5830f529d8 Merge branch 'master' into feature/esp32s2beta_merge 2019-10-02 19:01:39 +02:00
KonstantinKondrashov c5c41eab46 soc: Add interrupt numbers mapping for esp32s2beta
Closes: IDF-999
2019-09-26 00:22:36 +08:00
Roland Dobai 5a916ce126 Support ELF files loadable with gdb 2019-09-24 07:19:50 +00:00
KonstantinKondrashov c4da959fa7 soc: Fix setting timeout for RTC_WDT 2019-09-23 14:57:26 +08:00
Angus Gratton adfc06a530 Merge branch 'master' into feature/esp32s2beta_merge 2019-09-20 10:28:37 +10:00
Angus Gratton 83680bd96b Merge branch 'feature/esp32s2beta' into feature/esp32s2beta_merge 2019-09-19 21:08:20 +10:00
Jiang Jiang Jian d78831ab2b Merge branch 'bugfix/remove_v40_deprecations' into 'master'
Remove features deprecated before ESP-IDF V4.0

Closes IDF-507

See merge request espressif/esp-idf!5841
2019-09-19 16:07:01 +08:00
Angus Gratton bcaaaa1632 Merge branch 'feature/esp32s2beta_wdt' into 'feature/esp32s2beta'
esp32s2beta: Re-enable interrupt WDT, RTC_WDT, Task wdt

See merge request espressif/esp-idf!5786
2019-09-19 11:10:58 +08:00
Angus Gratton 438d513a95 Merge branch 'master' into feature/esp32s2beta_merge 2019-09-16 16:18:48 +10:00
Michael (XIAO Xufeng) 511820820e esp_flash: fix the coredump issue
During coredump, dangerous-area-checking should be disabled, and cache
disabling should be replaced by a safer version.

Dangerous-area-checking used to be in the HAL, but it seems to be more
fit to os functions. So it's moved to os functions. Interfaces are
provided to switch between os functions during coredump.
2019-09-14 17:01:36 +08:00
Jack 95ec36afd4 dport: remove clock_en and reset bitname which is not suitable 2019-09-13 09:44:07 +10:00
Angus Gratton 33a186f630 soc: Remove deprecated LEDC struct register names (bit_num, div_num)
Deprecated since ESP-IDF V3.0
2019-09-13 09:44:07 +10:00
Angus Gratton 6195c69701 soc: remove deprecated io_mux PIN_PULLxxx_yyy macros
Deprecated before ESP-IDF V1.0!
2019-09-13 09:44:07 +10:00
Angus Gratton 11c1da5276 soc/pm: Remove deprecated use of rtc_cpu_freq_t enum
Removes deprecated ways of setting/getting CPU freq, light sleep freqs.

Deprecated since ESP-IDF V3.2
2019-09-13 09:44:07 +10:00
KonstantinKondrashov d3637cd06b rtc_wdt: re-enable RTC_WDT 2019-09-13 00:03:52 +08:00
Michael (XIAO Xufeng) d7d5aebdee soc: fix memory map for esp32 and esp32s2beta 2019-09-12 16:17:52 +08:00
Angus Gratton 35147119f1 Merge branch 'feature/support_ut_esp32s2beta' into 'feature/esp32s2beta'
ci: support build and run UT for esp32s2beta

See merge request espressif/esp-idf!5702
2019-09-09 08:34:16 +08:00
jiangguangming c057c141eb Fix bug for reserved memory regions
1. Release 16KB memory of reserved regions to heap
2. Modify the dram_seg address of bootloader to 0x3FFF8000, size is 16K
2019-09-05 19:00:14 +08:00
Li Shuai bd29202520 1. Fix backtrace is incomplete
2. Optimization code style
2019-09-05 18:40:33 +08:00
Angus Gratton e44df658d5 spiram: Fix ESP32 SPIRAM when using SPIRAM_TYPE_AUTO, disable "AUTO" for ESP32-S2
Requirement to enable for ESP32-S2 captured in IDF-912.
2019-09-04 10:53:25 +10:00
Michael (XIAO Xufeng) 55859f59cb support for esp32s2beta 2019-09-04 10:53:25 +10:00
Michael (XIAO Xufeng) 43135dc348 spi: convenient LL macro 2019-09-04 10:53:25 +10:00
Michael (XIAO Xufeng) 3b39e60f97 driver: remove unused drivers for esp32s2beta 2019-09-04 10:53:25 +10:00
Michael (XIAO Xufeng) 05739798c3 soc: s2beta support 2019-09-04 10:53:25 +10:00
Roland Dobai 612db28b6f Fix error code collision and CI check 2019-08-29 08:14:08 +00:00
fuzhibo c9a911e4aa rtc: update from bringup branch 2019-08-22 15:03:18 +08:00
Angus Gratton 38d61f83db Merge branch 'feature/esp32s2beta_update' into 'feature/esp32s2beta'
esp32s2beta: Merge master into esp32s2beta branch

See merge request espressif/esp-idf!5724
2019-08-21 15:20:28 +08:00
Angus Gratton 685c9cc867 esp32sbeta: Add timer_ll.h 2019-08-19 15:03:48 +10:00
Angus Gratton 6990a7cd54 Merge branch 'master' into feature/esp32s2beta_update 2019-08-19 15:03:43 +10:00
Angus Gratton 74c2eb3aff Merge branch 'fix/esp_flash_set_get_wp' into 'master'
esp_flash: fix the set/get write protection functions

See merge request espressif/esp-idf!5682
2019-08-16 06:14:48 +08:00
Angus Gratton 367ecc2d60 Merge branch 'refactor/timerg_in_test' into 'master'
timer_group: refactoring to avoid direct register access in the ISR

See merge request espressif/esp-idf!5656
2019-08-14 15:32:16 +08:00
KonstantinKondrashov 62ee29250e soc: Update rtc_vddsdio_get_config for esp32s2beta
Closes: IDF-749
2019-08-13 20:04:49 +08:00
Angus Gratton 18c5cfadae Fix function prototypes 2019-08-13 17:14:16 +10:00
Angus Gratton c47e1756f8 examples: Rename deprecate CONFIG_CONSOLE_UART_NUM macro 2019-08-13 17:14:16 +10:00
suda-morris f86e82cb63 efuse: update the scheme of getting chip revision 2019-08-13 10:59:02 +08:00
Michael (XIAO Xufeng) d850a0bd1c esp_attr: add flag_attr to support enums used as flags 2019-08-09 13:46:32 +08:00
Michael (XIAO Xufeng) feea477023 timer_group: add LL functions for WDT 2019-08-09 13:46:30 +08:00
Michael (XIAO Xufeng) c02981a99b timer_group: support interrupt LL and some utility functions in ISR 2019-08-09 13:46:30 +08:00
chenjianqiang a97fe5615f feat(timer): refator timer group driver (partly pick) 2019-08-09 13:46:29 +08:00
Michael (XIAO Xufeng) e947522f38 esp_flash: improve the comments a bit 2019-08-08 23:18:01 +08:00
Angus Gratton 04ae56806c Merge branch 'master' into feature/esp32s2beta_update 2019-08-08 15:26:58 +10:00
Angus Gratton 24d26fccde Merge branch 'master' into feature/esp32s2beta_update 2019-08-08 13:44:24 +10:00
morris 1877a9fcd8 Merge branch 'feature/esp32s2beta_rtc_driver' into 'feature/esp32s2beta'
Feature/esp32s2beta rtc driver

See merge request espressif/esp-idf!5243
2019-08-07 14:43:17 +08:00
fuzhibo 572084821b add Comment for touchpad 2019-08-07 11:39:17 +08:00
fuzhibo b055bff580 1.update touch driver; 2.update adc/dac driver; 3.add temp sensor driver; 2019-08-05 16:21:18 +08:00
kooho 2139ca668d Update I2S driver for esp32s2beta. 2019-08-05 16:05:16 +08:00
Anton Maklakov afbaf74007 tools: Mass fixing of empty prototypes (for -Wstrict-prototypes) 2019-08-01 16:28:56 +07:00
kooho f98e7bbccf Update LEDC, PCNT,Timer_Group driver for esp32s2beta. 2019-07-31 16:03:22 +08:00
Angus Gratton eae6f5a1d6 Merge branch 'feature/esp32s2beta_rmt_driver' into 'feature/esp32s2beta'
Driver(RMT): Update RMT driver for esp32s2beta

See merge request espressif/esp-idf!5227
2019-07-30 18:21:59 +08:00
Michael (XIAO Xufeng) fa555e3109 esp_flash: fix a compatibility issue working with the ROM
The esp_flash API has a side effects: it modifies the clock control
registers, and this makes the clock inconsistent with the ROM variable
`g_rom_spiflash_dummy_len_plus`.

This commit helps the ROM to get the correct dummy cycles required by
the latest clock settings. Every device on the SPI1 bus will update the
ROM variable when it modifies the clock registers.
2019-07-29 03:00:09 +00:00
suda-morris 018de8101f ethernet: can build without enable esp32 emac
Closes https://github.com/espressif/esp-idf/issues/3770
2019-07-22 21:07:02 +08:00
Tomer Shefler 97ad2bcb86 ethernet: support giving 50mhz rmii clock with both 40mhz and 26 mhz rtc xtal
Merges https://github.com/espressif/esp-idf/pull/3769
Closes https://github.com/espressif/esp-idf/pull/3704
2019-07-22 21:07:02 +08:00
suda-morris af78311975 ethernet: malloc hal together with driver context 2019-07-22 21:07:02 +08:00
chenjianqiang e43513b610 bugfix(uart): uniform AT_CMD char configuration 2019-07-18 19:24:13 +08:00
chenjianqiang 91ae40e2ff uart: multichip support 2019-07-18 15:57:00 +08:00
chenjianqiang 4cc962353c feat(uart): update uart driver for esp32s2beta 2019-07-18 15:57:00 +08:00
KonstantinKondrashov ffaee97e81 soc/esp32s2beta: Exclude DPORT check 2019-07-15 06:51:03 +00:00
houwenxiang 6a8fe5cf79 Update RMT driver for esp32s2beta 2019-07-11 19:15:05 +08:00
chenjianqiang 667113cf94 feat(i2c): update i2c driver for esp32s2beta 2019-07-10 11:41:36 +08:00
Michael (XIAO Xufeng) 25ab8380c8 ci: support to build esp32s2beta simple examples 2019-07-08 09:16:06 +08:00
suda-morris cb42c29252 ethernet: support dm9051
1. move resource allocation from xxx_init to xxx_new
2. fix enabling tx checksum insertion by mistake
3. iperf example: enlarge max arguments
4. add examples for spi-ethernet

Closes https://github.com/espressif/esp-idf/issues/3715
Closes https://github.com/espressif/esp-idf/issues/3711
2019-07-04 19:38:13 +08:00
boarchuz b0168310db Typo correction
Merges https://github.com/espressif/esp-idf/pull/3604
2019-07-02 17:49:49 +08:00
Jiang Jiang Jian e2b88207b4 Merge branch 'feature/esp32s2beta_wifi' into 'feature/esp32s2beta'
run WiFi on ESP32SBETA

See merge request idf/esp-idf!5293
2019-06-30 00:40:34 +08:00
Xia Xiaotian 99ef587a05 run WiFi on ESP32SBETA 2019-06-28 11:34:49 +08:00
Ivan Grokhotkov d7d91225d3 Merge branch 'feature/refactor_etherent_driver' into 'master'
add esp_eth component

Closes IDF-324, IDF-637, and IDFGH-1139

See merge request idf/esp-idf!5111
2019-06-28 03:44:44 +08:00
Michael (XIAO Xufeng) d6bd24ca67 esp_flash: add initialization interface for SPI devices 2019-06-27 13:27:27 +08:00
suda-morris 90c4827bd2 add esp_eth component 2019-06-26 10:19:23 +08:00
Michael (XIAO Xufeng) 17378fd4c2 spi: support new chip esp32s2beta 2019-06-23 12:17:27 +08:00
Michael (XIAO Xufeng) 93ef3980e7 spi: fix cmakelists missing 2019-06-22 19:09:06 +08:00
Michael (XIAO Xufeng) 9b13a04abf spi: multichip support
move hardcoded numbers, etc. into soc files.
create headers for shared types which needs to be documented.

(MINOR CHANGE)
2019-06-22 19:08:47 +08:00
Renz Christian Bagaporo 9b350f9ecc cmake: some formatting fixes
Do not include bootloader in flash target when secure boot is enabled.
Emit signing warning on all cases where signed apps are enabled (secure
boot and signed images)
Follow convention of capital letters for SECURE_BOOT_SIGNING_KEY
variable, since it is
relevant to other components, not just bootloader.
Pass signing key and verification key via config, not requiring
bootloader to know parent app dir.
Misc. variables name corrections
2019-06-21 19:53:29 +08:00
Renz Christian Bagaporo 9eccd7c082 components: use new component registration api 2019-06-21 19:53:29 +08:00
Angus Gratton bd9590502c Merge branch 'bugfix/spi_flash_remove_include_chain_in_host_drv' into 'master'
esp_flash: support C++ and improve the document

See merge request idf/esp-idf!5287
2019-06-21 13:12:09 +08:00
Angus Gratton 126b687c75 Merge branch 'refactor/vfs_uart_multichip_support' into 'master'
vfs_uart & uart: add multichip support

See merge request idf/esp-idf!5298
2019-06-20 18:31:24 +08:00
Michael (XIAO Xufeng) ea1dcf7fe4 gpio: fix missing cmakelists for esp32s2beta 2019-06-20 12:06:51 +08:00
chenjianqiang cf2ba210ef uart: multichip support 2019-06-20 11:32:22 +08:00
Ivan Grokhotkov 026533cd72 esp_flash: fix C++ compilation and some typos 2019-06-20 10:55:13 +08:00
Michael (XIAO Xufeng) caf121e4b6 esp_flash: break the inappropriate include chain in spi_flash_host_drv.h 2019-06-20 10:55:12 +08:00
Michael (XIAO Xufeng) 5c9dc44c49 spi: multichip support
move hardcoded numbers, etc. into soc files.
create headers for shared types which needs to be documented.

(MINOR CHANGE)
2019-06-20 10:38:52 +08:00
Darian Leung 037c079e9a esp32: Refactor backtrace and add esp_backtrace_print()
This commit refactors backtracing within the panic handler so that a common
function esp_backtrace_get_next_frame() is used iteratively to traverse a
callstack.

A esp_backtrace_print() function has also be added that allows the printing
of a backtrace at runtime. The esp_backtrace_print() function allows unity to
print the backtrace of failed test cases and jump back to the main test menu
without the need reset the chip. esp_backtrace_print() can also be used as a
debugging function by users.

- esp_stack_ptr_is_sane() moved to soc_memory_layout.h
- removed uncessary includes of "esp_debug_helpers.h"
2019-06-19 18:30:18 +08:00
suda-morris 3f7a571c90 fix errors when ci testing for esp32 2019-06-19 15:31:47 +08:00
Michael (XIAO Xufeng) 1036a091fe spi_flash: support working on differnt buses and frequency 2019-06-18 06:32:52 +00:00
fuzhibo 29ea0dec76 Driver: gpio and rtcio dirver update 2019-06-14 20:27:26 +08:00
Ivan Grokhotkov 51a7df196d esp32s2beta: fix soc_memory_layout
1. use SOC_RESERVE_MEMORY_REGION
2. reserve part of the DRAM which is mapped to same banks as IRAM
2019-06-13 01:34:54 +08:00
Ivan Grokhotkov dcaae4a5fc esp32s2beta: convert some todos to warnings 2019-06-12 15:53:57 +08:00
suda-morris 4a79d750a5 clean up build warnings 2019-06-11 13:07:37 +08:00
Angus Gratton ddbd09eb15 esp32/esp32s2beta: Extract common SPIRAM options into esp_commmon component 2019-06-11 13:07:37 +08:00
suda-morris 82c27a39f2 can build and run hello-world app 2019-06-11 13:07:37 +08:00
Angus Gratton 047aca97e8 esp32s2beta: Fix heap memory regions when SPIRAM is disabled 2019-06-11 13:07:37 +08:00
suda-morris 84b2f9f14d build and link hello-world for esp32s2beta 2019-06-11 13:07:37 +08:00
suda-morris 61ce868396 make bootloader_support support esp32s2beta 2019-06-11 13:07:02 +08:00
suda-morris 91508ca27f add esp32s2beta in soc component 2019-06-11 13:06:32 +08:00
Gautier Seidel 542e544faa esp32: Allow fixed static RAM size and DRAM heap size
Merges https://github.com/espressif/esp-idf/pull/3222
2019-06-06 18:23:04 +10:00
Angus Gratton 045aaf6fb0 Merge branch 'feature/add_xxx_periph_h' into 'master'
soc: Add xxx_periph.h for all modules

Closes IDF-192

See merge request idf/esp-idf!4952
2019-06-04 13:24:14 +08:00
Wu Jian Gang 4d3762a8df clk: Fix the overflow when setting ccount
The multiplication will be overflow when using 160 or 240 MHz, this can lead the inaccuracy of log time stamp in startup.
2019-06-03 11:04:47 +00:00
Konstantin Kondrashov 399d2d2605 all: Using xxx_periph.h
Using xxx_periph.h in whole IDF instead of xxx_reg.h, xxx_struct.h, xxx_channel.h ... .

Cleaned up header files from unnecessary headers (releated to soc/... headers).
2019-06-03 14:15:08 +08:00
Konstantin Kondrashov 3ddab0b8f3 soc: Add xxx_periph.h for all modules
The "xxx_periph" header file includes all SOC-level definitions for that peripheral.

Closes: IDF-192
2019-06-03 13:56:54 +08:00
Jeroen Domburg 0e7442bb7a Merge branch 'feature/spi_slave_support_hal' into 'master'
spi_slave: add HAL support

See merge request idf/esp-idf!4830
2019-05-22 13:42:11 +08:00
Roland Dobai a1bddb923b Rename Kconfig options (components/bt) 2019-05-21 09:09:01 +02:00
Roland Dobai 0ae53691ba Rename Kconfig options (components/esp32) 2019-05-21 09:09:01 +02:00
Michael (XIAO Xufeng) 33db6d608e spi_slave: add HAL support 2019-05-20 07:34:34 +00:00
Ivan Grokhotkov 2b301f53e4 Merge branch 'bugfix/fix_build_make_macos' into 'master'
make: fix build failure on macos with GNU make <= 3.81

See merge request idf/esp-idf!5010
2019-05-20 10:44:49 +08:00
David Cermak 8f91d730da make: fix build failure on macos with GNU make <= 3.81
Closes https://github.com/espressif/esp-idf/issues/3459
2019-05-16 14:09:43 +02:00
Renz Christian Bagaporo ffec9d4947 components: update with build system changes 2019-05-13 19:59:17 +08:00
michael 0b523c2300 spi_master: fix the dual/quad io issue
introduced in f871cc5ffa

The issue is caused by

1. The hal didn't pass the io_mode to LL.
2. The setup_device function overwrite the trans-specific settings.
2019-04-27 01:36:47 +08:00
Michael (XIAO Xufeng) 9a00b7706e fix the dram low addr defined in the soc.h header 2019-04-25 17:29:48 +08:00
Michael (XIAO Xufeng) 562af8f65e global: move the soc component out of the common list
This MR removes the common dependency from every IDF components to the SOC component.

Currently, in the ``idf_functions.cmake`` script, we include the header path of SOC component by default for all components.
But for better code organization (or maybe also benifits to the compiling speed), we may remove the dependency to SOC components for most components except the driver and kernel related components.

In CMAKE, we have two kinds of header visibilities (set by include path visibility):

(Assume component A --(depends on)--> B, B is the current component)

1. public (``COMPONENT_ADD_INCLUDEDIRS``): means this path is visible to other depending components (A) (visible to A and B)
2. private (``COMPONENT_PRIV_INCLUDEDIRS``): means this path is only visible to source files inside the component (visible to B only)

and we have two kinds of depending ways:

(Assume component A --(depends on)--> B --(depends on)--> C, B is the current component)

1. public (```COMPONENT_REQUIRES```): means B can access to public include path of C. All other components rely on you (A) will also be available for the public headers. (visible to A, B)
2. private (``COMPONENT_PRIV_REQUIRES``): means B can access to public include path of C, but don't propagate this relation to other components (A). (visible to B)

1. remove the common requirement in ``idf_functions.cmake``, this makes the SOC components invisible to all other components by default.
2. if a component (for example, DRIVER) really needs the dependency to SOC, add a private dependency to SOC for it.
3. some other components that don't really depends on the SOC may still meet some errors saying "can't find header soc/...", this is because it's depended component (DRIVER) incorrectly include the header of SOC in its public headers. Moving all this kind of #include into source files, or private headers
4. Fix the include requirements for some file which miss sufficient #include directives. (Previously they include some headers by the long long long header include link)

This is a breaking change. Previous code may depends on the long include chain.
You may need to include the following headers for some files after this commit:

- soc/soc.h
- soc/soc_memory_layout.h
- driver/gpio.h
- esp_sleep.h

The major broken include chain includes:

1. esp_system.h no longer includes esp_sleep.h. The latter includes driver/gpio.h and driver/touch_pad.h.
2. ets_sys.h no longer includes soc/soc.h
3. freertos/portmacro.h no longer includes soc/soc_memory_layout.h

some peripheral headers no longer includes their hw related headers, e.g. rom/gpio.h no longer includes soc/gpio_pins.h and soc/gpio_reg.h

BREAKING CHANGE
2019-04-16 13:21:15 +08:00
Angus Gratton f871cc5ffa Merge branch 'feat/spi_hal_support' into 'master'
spi_master: refactor and add HAL support

See merge request idf/esp-idf!4159
2019-04-15 07:57:11 +08:00
Angus Gratton 8e91677701 Merge branch 'bugfix/bootloader_flash_crypt_cnt_ff' into 'master'
flash encryption: reduce FLASH_CRYPT_CNT bit width to 7 bits

See merge request idf/esp-idf!4642
2019-04-09 08:10:06 +08:00
Renz Christian Bagaporo 90ee405afd ldgen: update component linker fragment files 2019-04-04 15:57:34 +08:00
huub 4aac441e46 soc:Added names to anonymous register structs
For typedef volatile struct in components/soc/esp32/include/soc

Merges https://github.com/espressif/esp-idf/pull/3199
2019-04-03 03:09:44 +00:00
Angus Gratton 4b4cd7fb51 efuse/flash encryption: Reduce FLASH_CRYPT_CNT to a 7 bit efuse field
8th bit is not used by hardware.

As reported https://esp32.com/viewtopic.php?f=2&t=7800&p=40895#p40894
2019-04-03 14:07:20 +11:00
Angus Gratton ae585b6615 Merge branch 'bugfix/external_rtc_start_fail' into 'master'
Bugfix/external rtc start fail

See merge request idf/esp-idf!4374
2019-04-02 09:42:27 +08:00
Michael (XIAO Xufeng) af2fc96ee1 spi_master: refactor and add HAL support 2019-03-28 17:14:50 +08:00
morris dbdb299bb1 create xtensa component
1. move xtensa specific files out of esp32 component
2. merge xtensa-debug-module component into xtensa
2019-03-27 20:24:28 +08:00
morris c159984264 separate rom from esp32 component to esp_rom
1. separate rom include files and linkscript to esp_rom
2. modefiy "include rom/xxx.h" to "include esp32/rom/xxx.h"
3. Forward compatible
4. update mqtt
2019-03-21 18:51:45 +08:00
Ivan Grokhotkov 106dc05903 Merge branch 'feature/specify_includes_belonging_esp32' into 'master'
move esp32 chip specific includes to esp32/xxx.h

See merge request idf/esp-idf!4534
2019-03-21 18:34:08 +08:00
Ivan Grokhotkov 6d4a7b1a7e Merge branch 'bugfix/cmake_soc_test' into 'master'
soc: fix compiling unit tests with CMake

Closes IDF-499

See merge request idf/esp-idf!4545
2019-03-21 13:34:58 +08:00
maojianxin 95301c16bd Fix external start fail 2019-03-20 18:34:01 +08:00
Zhang Jun Yi 5ba87240b5 soc/rtc: Bypass touchpad current to external 32k crystal oscillator 2019-03-20 18:34:01 +08:00
Ivan Grokhotkov 73851e0b5c soc: fix compiling unit tests with CMake
soc unit tests have not been included when compiling with CMake,
because ../${SOC_NAME}/test was not evaluated relative to the
CMakeLists.txt directory.

Also call register_components() regardless of the presence of test
directory for particular target.
2019-03-19 11:42:51 +08:00
morris 956c25dedd move esp32 chip specific includes to esp32/xxx.h 2019-03-18 17:14:05 +08:00
Angus Gratton 2dd3344342 heap: Add integer overflow checks on MALLOC_CAP_32BIT & MALLOC_CAP_EXEC 2019-03-18 01:41:58 +00:00
Konstantin Kondrashov b8141f3ad8 efuse: Fix make/cmake build systems and docs 2019-02-28 07:31:29 +00:00
Konstantin Kondrashov 9822055851 efuse: Add support coding scheme to script
Added support using BLK1 and BLK2 in custom table.
Added change size key in BLK1 and BLK2 if coding scheme was changed.
2019-02-28 07:31:29 +00:00
Konstantin Kondrashov d82023bf06 soc: Add support efuse 2019-02-28 07:31:29 +00:00
Ivan Grokhotkov 8cc6226051 soc: define named constants for DPORT_CPUPERIOD_SEL values 2019-02-26 17:07:59 +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
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
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
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
maojianxin 0676941332 soc/rtc: fix RTC_TOUCH_TRIG_EN or RTC_ULP_TRIG_EN should keep RTC_PERIPH power on 2019-02-13 10:30:37 +08:00
Zhang Jun Yi c5b4512a27 soc/rtc: Bypass touchpad current to external 32k crystal oscillator 2019-02-13 10:15:45 +08:00
Ivan Grokhotkov 2eabed161a Merge branch 'feature/merge_multiple_github_prs' into 'master'
Multiple Github PRs

See merge request idf/esp-idf!4146
2019-01-24 15:14:47 +08:00
Pieter du Preez 496bfe3842 Initialized some uninitialized variables in rtc_clk.c and ringbuf.c.
The following 2 compiler warnings are only reproducible when setting:
   OPTIMIZATION_FLAGS = -Ofast

esp-idf/components/soc/esp32/rtc_clk.c:
In function 'rtc_clk_cpu_freq_get':
esp-idf/components/soc/esp32/rtc_clk.c:506:12:
error: 'freq' may be used uninitialized in this function
[-Werror=maybe-uninitialized]
	return freq;

esp-idf/components/esp_ringbuf/ringbuf.c:
In function 'xRingbufferReceiveSplitFromISR':
esp-idf/components/esp_ringbuf/ringbuf.c:934:26:
error: 'pvTempTailItem' may be used uninitialized in this function
[-Werror=maybe-uninitialized]
	*ppvTailItem = pvTempTailItem;

Closes https://github.com/espressif/esp-idf/pull/2878
2019-01-23 16:47:23 +05:30
Wangjialin 78bea94d8a feature: add support for setting core voltage in high performance cases.
1. add definitions of EFUSE_RD_VOL_LEVEL_HP_INV in efuse_reg.h
2. modify the core voltage according to the record in efuse in high performance cases.
2019-01-22 12:13:58 +08:00
Wangjialin d518a19d95 driver(ledc): fix ledc fade API and update the register header file
1. fix error when fading is too fast
2. fix error when setting duty and update immediately
3. update register header file to be in accord with TRM

closes https://github.com/espressif/esp-idf/issues/2903
2019-01-12 00:56:38 +08:00
Konstantin Kondrashov 82c5e648ad esp32: Fix wdt settings in esp_restart_noos
Fixed compatibility the new apps with the old bootloaders.

Closes: https://github.com/espressif/esp-idf/issues/2927
2019-01-10 20:22:26 +08:00
Ivan Grokhotkov 0cf8d1380e soc/rtc: reset another BBPLL related register
Follow-up to b21ffc8a: an additional register needs to be reset.

Ref. https://github.com/espressif/esp-idf/issues/2711
2018-12-12 12:24:48 +08:00
Ivan Grokhotkov 04c511c9b5 panic: dump some instruction memory on IllegalInstruction exception 2018-12-07 16:50:00 +08:00
Ivan Grokhotkov b21ffc8a0c soc/rtc: reset BBPLL configuration after enabling it
A workaround to reset BBPLL configuration after light sleep. Fixes the
issue that Wi-Fi can not receive packets after waking up from light
sleep.

Ref. https://github.com/espressif/esp-idf/issues/2711
2018-12-06 14:43:24 +08:00
Angus Gratton 441e2d5011 Merge branch 'bugfix/register_structs_stdint' into 'master'
soc: Add "#include <stdint.h>" to all register structs

See merge request idf/esp-idf!3875
2018-12-05 08:05:56 +08:00
Jeroen Domburg d6ee27e313 Merge branch 'feat/spi_check_length_buffer' into 'master'
spi: add checks for slave buffer valid and master length

See merge request idf/esp-idf!3744
2018-12-04 11:48:32 +08:00
Angus Gratton 7f32995a4c soc: Add "#include <stdint.h>" to all register structs
Closes https://github.com/espressif/esp-idf/issues/2239

TW24912
2018-12-04 11:17:38 +11:00
kooho da223fad4e driver(rmt): Add API get rmt channel's status.
closes https://github.com/espressif/esp-idf/issues/1175
closes https://github.com/espressif/esp-idf/issues/2599
closes https://github.com/espressif/esp-idf/issues/2452
2018-11-28 07:20:45 +00:00
michael cfba157fdd spi_slave: add valid check for DMA buffers
The DMA cannot receive data correctly when the buffer address is not
WORD aligned. Currently we only check whether the buffer is in the DRAM
region.

The DMA always write in WORDs, so the length arguments should also be
multiples of 32 bits.

A check is added to see whether the buffer is WORD aligned and has valid
length.
2018-11-26 03:49:26 +00:00
Ivan Grokhotkov 00a13bd8d3 Merge branch 'bugfix/init_memctl' into 'master'
bootloader, esp32: add workaround for Tensilica erratum 572

See merge request idf/esp-idf!3605
2018-11-19 18:36:47 +08:00
Ivan Grokhotkov a46b884a14 Merge branch 'feature/unit_test_example' into 'master'
Move Unity into components, add unit test example

See merge request idf/esp-idf!3562
2018-11-19 18:35:54 +08:00
Ivan Grokhotkov 964f5a91f7 bootloader, esp32: add workaround for Tensilica erratum 572
If zero-overhead loop buffer is enabled, under certain rare conditions
when executing a zero-overhead loop, the CPU may attempt to execute an invalid instruction. Work around by disabling the buffer.
2018-11-19 04:39:35 +00:00
Ivan Grokhotkov 6091021e83 unity: separate common and IDF specific functionality
New unity component can be used for testing other applications.
Upstream version of Unity is included as a submodule.
Utilities specific to ESP-IDF unit tests (partitions, leak checking
setup/teardown functions, etc) are kept only in unit-test-app.
Kconfig options are added to allow disabling certain Unity features.
2018-11-19 12:36:31 +08:00
Renz Bagaporo 63411fc556 tools: implement linker script generation 2018-11-16 12:42:02 +08:00
Ivan Grokhotkov 7efb3926c5 Merge branch 'feature/build_system_multi_target' into 'master'
build system: support for multiple targets (CMake only)

See merge request idf/esp-idf!3499
2018-11-12 15:30:36 +08:00
Ivan Grokhotkov ccfa134533 build system: support for multiple targets 2018-11-11 21:46:02 +08:00
shawwwn 288d9b75e9 rtc_clk: bugfix: incorrect divider setting in rtc_clk_cpu_freq_to_config()
Merges https://github.com/espressif/esp-idf/pull/2404
2018-11-08 15:57:10 +05:30
Konstantin Kondrashov 8bba348528 aes/sha/mpi: Bugfix a use of shared registers.
This commit resolves a blocking in esp_aes_block function.

Introduce:
The problem was in the fact that AES is switched off at the moment when he should give out the processed data. But because of the disabled, the operation can not be completed successfully, there is an infinite hang. The reason for this behavior is that the registers for controlling the inclusion of AES, SHA, MPI have shared registers and they were not protected from sharing.

Fix some related issue with shared using of AES SHA RSA accelerators.

Closes: https://github.com/espressif/esp-idf/issues/2295#issuecomment-432898137
2018-11-05 04:22:47 +00:00
Michael (XIAO Xufeng) 4132834faa test: fix the unit test fail issue under single_core config
Introduced in 97e3542947.

The previous commit frees the IRAM part when single core, but doesn't
change the memory layout functions. The unit test mallocs IRAM memory
from the heap, accidently into the new-released region, which doesn't
match the memory layout function.

This commit update the memory layout function to fix this.
2018-10-31 17:04:32 +08:00
Jiang Jiang Jian 97e3542947 Merge branch 'bugfix/release_some_memory_on_single_core_mode' into 'master'
release memory not used in single core mode

See merge request idf/esp-idf!2733
2018-10-30 15:53:31 +08:00
Michael (XIAO Xufeng) d0361a32d7 test: fix the IRAM type conflict issue using heap_caps_malloc 2018-10-25 12:31:44 +08:00
Renz Bagaporo cc774111bf cmake: Add support for test build 2018-10-20 12:07:24 +08:00
Ivan Grokhotkov bd11965f6c Merge branch 'bugfix/ndebug_build' into 'master'
soc,sdmmc: fix build failures when NDEBUG is used

See merge request idf/esp-idf!3352
2018-10-19 11:55:37 +08:00
Angus Gratton f53fef9936 Secure Boot & Flash encryption: Support 3/4 Coding Scheme
Includes esptool update to v2.6-beta1
2018-10-16 16:24:10 +11:00
Ivan Grokhotkov a20d9287fe soc: use _EARLY versions of ESP_LOG
Some logging done in soc component may happen before logging via
stdout is possible. Use _EARLY version of log calls to make sure that
output is visible. The downside is that application does not have a
way to silence these logs. However since the soc component doesn’t
use any LOGV/LOGD/LOGI and only logs warnings and errors, this should
not impact the application.
2018-10-15 14:59:46 +08:00
Ivan Grokhotkov ab68b9d90d soc,sdmmc: fix build failures when NDEBUG is used
Use explicit error checking instead of asserts, use SOC_LOG to print
error/warning messages where needed.
2018-10-15 14:57:12 +08:00
Ivan Grokhotkov 22b840f3df bootloader: don’t reload RTC_FAST DRAM after deep sleep
When CONFIG_ESP32_RTCDATA_IN_FAST_MEM is enabled, RTC data is placed
into RTC_FAST memory region, viewed from the data bus. However the
bootloader was missing a check that this region should not be
overwritten after deep sleep, which caused .rtc.bss segment to loose
its contents after wakeup.
2018-09-29 14:02:16 +08:00
Jack 2efd6859ed release memory not used in single core mode
1. do not start ipc task in single core mode
2. do not use APP cpu cache memory in single core mode
3. relase data used in rom by APP cpu
2018-09-25 15:13:47 +08:00
negativekelvin 8e2856b83d soc: fix CPU frequency not updated in rtc_clk_init
Add missing call to rtc_clk_cpu_freq_set_config

Merges https://github.com/espressif/esp-idf/pull/2398
2018-09-12 21:13:42 +08:00
Renz Christian Bagaporo d9939cedd9 cmake: make main a component again 2018-09-11 09:44:12 +08:00
Angus Gratton cff2ef695a Merge branch 'master' into feature/cmake 2018-09-06 20:23:04 +08:00
Angus Gratton b355854d4d Merge branch 'master' into feature/cmake 2018-09-05 10:35:04 +08:00
Konstantin Kondrashov 38098b713f esp32/sleep: Add a function to disable logging from ROM code 2018-09-04 16:03:18 +08:00
Konstantin Kondrashov 9c715d7946 bootloader_support: Fix enable rtc_wdt for resolve issue with varying supply
Eliminates the issue with the lock up in the bootloader due to a power drawdown during its operation.

Closes https://github.com/espressif/esp-idf/issues/1814
2018-09-03 05:43:01 +00:00
Angus Gratton 5fbfd20f10 Merge branch 'master' into feature/cmake 2018-08-30 18:52:31 +08:00
Angus Gratton a9c4ed7139 Merge branch 'master' into feature/cmake 2018-08-30 18:51:01 +08:00
Ivan Grokhotkov 78fab8a0f9 sdmmc: implement partial DDR support
Works for 3.3V eMMC in 4 line mode.
Not implemented:
- DDR mode for SD cards (UHS-I) also need voltage to be switched to 1.8V.
- 8-line DDR mode for eMMC to be implemented later.
2018-08-30 13:11:54 +08:00
Mahavir Jain f0fa66a50e rtc_wdt: fix overflow issue with setting wdt interval
Signed-off-by: Mahavir Jain <mahavir@espressif.com>
2018-08-24 18:06:39 +05:30
Ivan Grokhotkov 88d40e01b4 Merge branch 'feature/rtc_slowclk_extra_options' into 'master'
Add more RTC_SLOW_CLK options

See merge request idf/esp-idf!2984
2018-08-23 11:27:14 +08:00
Ivan Grokhotkov 902344c516 Merge branch 'bugfix/trace_mem_layout_pro_cpu' into 'master'
soc: fix trace memory region for single core mode

See merge request idf/esp-idf!3029
2018-08-22 16:51:43 +08:00
Ivan Grokhotkov 5bf3654637 soc/rtc: Force power on 8M clock if it is used to derive RTC slow clock 2018-08-22 11:33:20 +08:00
Ivan Grokhotkov 8365f0f5d2 soc/rtc: add support for external 32k oscillator
Compared to external 32k XTAL, when active oscillator is used as input,
some parameters need to be set differently.
2018-08-22 11:33:20 +08:00
Ivan Grokhotkov 90f5456dba Merge branch 'feature/rtc_cpu_freq_config' into 'master'
soc/rtc: Refactoring, support CPU frequencies lower than XTAL

See merge request idf/esp-idf!2856
2018-08-22 11:32:08 +08:00
Ivan Grokhotkov e59571eece soc/rtc_clk: reduce data size by disabling CSWTCH generation
Saves about 200 bytes of DRAM at the expense of 4 bytes in IRAM.
2018-08-21 13:02:46 +08:00
Ivan Grokhotkov db2f0f45be soc/rtc_clk: split rtc_clk_init into separate object file
rtc_clk_init and related functions don’t need to be in IRAM/DRAM.
2018-08-21 13:02:46 +08:00
Ivan Grokhotkov bcf79e5cf2 tests: use new CPU frequency setting API 2018-08-21 13:02:46 +08:00
Ivan Grokhotkov bec70ce298 esp32: use new CPU frequency setting API 2018-08-21 13:02:46 +08:00
Ivan Grokhotkov 2e31cce390 soc/rtc: CPU frequency settings refactoring
Previous APIs used to set CPU frequency used CPU frequencies listed in
rtc_cpu_freq_t enumeration. This was problematic for two reasons.
First, supporting many possible frequency values obtained by dividing
XTAL frequency was hard, as every value would have to be listed in
the enumeration. Since different base XTAL frequencies are supported,
this further complicated things, since not all of these divided
frequencies would be valid for any given XTAL frequency. Second,
having to deal with enumeration values often involved switch
statements to convert between enumeration and MHz values, handle
PLL/XTAL frequencies separately, etc.

This change introduces rtc_cpu_freq_config_t structure, which contains
CPU frequency (in MHz) and information on how this frequency has to
be generated: clock source (XTAL/PLL), source frequency, clock
divider value. More fields can be added to this structure in the
future. This structure simplifies many parts of the code, since both
frequency value and frequency generation settings can be accessed in
any place in code without the need for conversions.

Additionally, this change adds setting of REF_TICK dividers to support
frequencies lower then XTAL with DFS.
2018-08-21 13:02:03 +08:00
Jiang Jiang Jian 00ef8bf726 Merge branch 'feature/decrease_bt_contrller_memory_with_new_mem_reserved' into 'master'
decrease bt contrller memory with new mem reserved

See merge request idf/esp-idf!2791
2018-08-16 19:12:44 +08:00
Angus Gratton ff2404a272 Merge branch 'master' into feature/cmake 2018-08-16 17:14:17 +10:00
Mahavir Jain 0075e2f316 soc: fix trace memory region for single core mode
Signed-off-by: Mahavir Jain <mahavir@espressif.com>
2018-08-15 20:52:39 +05:30
Konstantin Kondrashov a8e46775c6 soc/rtc_wdt: Add API functions for rtc_wdt
Added functions:
rtc_wdt_protect_off/on
rtc_wdt_set_length_of_reset_signal
rtc_wdt_set_stage
rtc_wdt_set_time
rtc_wdt_feed
rtc_wdt_disable/enable
2018-08-14 17:48:02 +05:00
Tian Hao ee787085f9 component/bt : decrease memory consumption by conn number
1. BLE only with 9(max) connection will decrease 3K DRAM
2. BR/EDR only with 7(max) connection will decrease 16K DRAM
3. Any of BLE or BR/EDR connection number decrease will also decrease DRAM consumption
4. Decrease one BLE connection will save about 1KB DRAM
5. Decrease one BR/EDR ACL connection will save about 1.2KB DRAM
6. Decrease one BR/EDR SCO/eSCO will save 2KB DRAM.
7. fix some definition and kconfig
8. remove 1.2k of vhci tx cache and make .bss & .data to heap about 1.4K
9. modify BT Reserved Memory size and modify example to support new bt kconfig
2018-08-14 02:29:17 +00:00
Ivan Grokhotkov 8739111218 Merge branch 'bugfix/gpio_reset_bitmask' into 'master'
gpio: Bitmask overflow fix in gpio_reset_pin

See merge request idf/esp-idf!2966
2018-08-10 17:35:26 +08:00
Taavi Hein f7749e18a8 gpio: Bitmask overflow fix in gpio_reset_pin
For pins 32 and up the BIT(nr) macro used here overflowed,
causing undetermined GPIO pins to be reset.
Example: freeing SPI device/bus where CS is on pin 33
caused debug UART to cease communication, TXD0 was
disabled.

Fixed as BIT64(nr) macro, to be used elsewhere as needed.
For example in definitions like GPIO_SEL_32..GPIO_SEL_39.
2018-08-08 15:31:17 +03:00
Angus Gratton a5ae5ac4b3 soc: Allow components to reserve fixed memory ranges that they need
No longer necessary to keep all reserved addresses in 'soc'.

Means 'soc' does not need to know about 'bt', for example.

Also means that Bluetooth can be enabled in config without any memory being reserved for BT
controller. Only if code calling the BT controller is linked in, will this memory be reserved...
2018-08-06 01:37:55 +00:00
David Cermak 409c91bcb9 removed possible uint16 access to 32bit register, noted fifo use not recommended 2018-07-23 07:57:18 +02:00
Ivan Grokhotkov fec079cd44 Merge branch 'bugfix/rtc_io_hold_regs' into 'master'
Fix errors in rtc_gpio_desc values

See merge request idf/esp-idf!2765
2018-07-19 15:04:42 +08:00
Ivan Grokhotkov 5376a06d7b Merge branch 'bugfix/range_CONFIG_ESP32_RTC_CLK_CAL_CYCLES' into 'master'
soc/clk: Fix range CONFIG_ESP32_RTC_CLK_CAL_CYCLES

See merge request idf/esp-idf!2719
2018-07-17 19:43:11 +08:00
negativekelvin 8a9e3875ed
Fix errors in rtc_gpio_desc values 2018-07-12 23:16:15 -07:00