Commit Graph

1133 Commits

Author SHA1 Message Date
Angus Gratton
5228d9f9ce esp32c3: Apply one-liner/small changes for ESP32-C3 2020-12-01 10:58:50 +11:00
Michael (XIAO Xufeng)
a3b59aeeb5 Merge branch 'bugfix/clk_allocator' into 'master'
I2C: Fix logic issue on i2c clk allocator

See merge request espressif/esp-idf!11343
2020-11-26 18:18:52 +08:00
Cao Sen Miao
31afe8109f i2c: Fix bug on i2c clk allocator 2020-11-25 14:26:37 +08:00
Armando
05a4a8d864 uart: seperate sclk and baudrate setting 2020-11-24 19:12:52 +08:00
Armando
fb8b905539 uart: add uart support on esp32s3 2020-11-24 19:12:51 +08:00
Michael (XIAO Xufeng)
af992c26bc Merge branch 'bugfix/fix_x32k_startup_slow_bug' into 'master'
bugfix: Fix xtal 32k not oscillate or oscillate too slowly issue for esp32

See merge request espressif/esp-idf!10519
2020-11-24 17:37:29 +08:00
chaijie
a48b5246cc ESP32: Fix xtal 32k not oscillate or oscillate too slowly issue
ESP32 in revision0 and revision1 uses touchpad to provide
current to oscillate xtal 32k. But revision2 and revision3
do not need to do that.
Note: touchpad can not work and toupad/ULP wakeup sources
are not available when toupad provides current to xtal 32k
2020-11-23 19:38:11 +08:00
Chen Yi Qun
579b842fd6 Driver(ADC): remove ESP_LOGD from adc_set_init_code
ESP_LOGD is called from adc_set_init_code, which is invoked from a critical section.

Closes: https://github.com/espressif/esp-idf/issues/6091
2020-11-20 07:10:09 +00:00
fuzhibo
9162f23c2e bugfix(dac): fix testcase fail for dac 2020-11-17 12:23:12 +00:00
morris
b7ecccd901 test: fix several test build error 2020-11-16 13:30:49 +08:00
Cao Sen Miao
6eee601cf6 i2c: Add supports on esp32s3 2020-11-12 11:32:45 +08:00
Angus Gratton
66fb5a29bb Whitespace: Automated whitespace fixes (large commit)
Apply the pre-commit hook whitespace fixes to all files in the repo.

(Line endings, blank lines at end of file, trailing whitespace)
2020-11-11 07:36:35 +00:00
Angus Gratton
e82eac4354 cmake: Apply cmakelint fixes 2020-11-11 07:36:35 +00:00
Michael (XIAO Xufeng)
2e90bf6b15 Merge branch 'bugfix/spi_slave_remove_debug_code' into 'master'
spi_slave: remove debug code

Closes IDFGH-4161

See merge request espressif/esp-idf!10975
2020-11-09 12:26:22 +08:00
Angus Gratton
3882c2b8ed Merge branch 'feature/bringup_esp32s3_fpga_update_rmt_driver' into 'master'
rmt: support esp32s3

Closes IDF-1773

See merge request espressif/esp-idf!10292
2020-11-07 07:15:53 +08:00
Michael (XIAO Xufeng)
d7ce8a537f Merge branch 'feature/bringup_esp32s3_fpga_rtc_sleep' into 'master'
feature (rtc): update rtc related code(rtc_sleep rtc_init) to support esp32s3

See merge request espressif/esp-idf!10404
2020-11-05 19:19:36 +08:00
morris
1be923acb4 rmt: rename always_on to aware_dfs 2020-11-05 19:00:55 +08:00
morris
ff976867b3 rmt: split TX and RX in LL driver
Split TX and RX function in LL driver.
Channel number is encoded in driver layer.
Added channel signal list in periph.c
2020-11-05 19:00:55 +08:00
chenjianqiang
9465af0066 rmt: support esp32s3 2020-11-05 19:00:55 +08:00
fuzhibo
93c7cf094e rtc: update rtc related code(rtc_sleep rtc_init) to support esp32s3 2020-11-04 02:43:41 +00:00
morris
bc8b56cef7 timergroup: refactor unit test to better support future chip 2020-11-03 18:16:50 +08:00
morris
e4c8ec6174 timergroup: move interrupt index into peripheral description file
1. Added timer_group_periph.c file, describing module global signals
   (e.g. interrupt index)
2. Added more caps in soc_caps.h
2020-11-03 18:16:50 +08:00
morris
17808b3ff8 sigma_delta: add periph signal list and support esp32-s3 2020-10-29 11:06:28 +08:00
Michael (XIAO Xufeng)
12249dcb09 spi_master: fix the error log when use tx/rx_data with larger data 2020-10-27 23:34:03 +08:00
Michael (XIAO Xufeng)
9a394e1aa0 Merge branch 'feature/spi_bringup_esp32s3' into 'master'
spi: bringup on esp32s3

See merge request espressif/esp-idf!10107
2020-10-27 00:51:42 +08:00
Michael (XIAO Xufeng)
bcb5c3506d Merge branch 'feature/dedicated_gpio' into 'master'
Dedicated GPIO driver on ESP32-S2 and ESP32-S3

Closes IDF-1672

See merge request espressif/esp-idf!8716
2020-10-26 15:33:33 +08:00
Armando
f7e91ef6c1 spi: esp32s3 bringup for spi 2020-10-26 11:28:34 +08:00
Armando
5a3cca8f67 spi_slave: remove debug code
Closes https://github.com/espressif/esp-idf/pull/6023
2020-10-26 10:59:33 +08:00
Michael (XIAO Xufeng)
b744c14a8a Merge branch 'bugfix/spi_slave_fix_cs_num_crash' into 'master'
spi_slave: fix crash issue when cs is set to -1

Closes IDFGH-3885

See merge request espressif/esp-idf!10414
2020-10-22 22:36:21 +08:00
morris
bb1369b922 dedicated gpio: add driver 2020-10-20 21:06:09 +08:00
Michael (XIAO Xufeng)
2e681f4cb5 Merge branch 'bugfix/fix_rs485_ut_fail' into 'master'
Bugfix/fix RS485 ut fail

See merge request espressif/esp-idf!9448
2020-10-19 16:17:23 +08:00
Alex Lisitsyn
8737584789 Bugfix/fix RS485 ut fail 2020-10-19 16:17:19 +08:00
morris
906dd0ad84 pcnt: replace isr register with isr service in example 2020-10-19 11:56:18 +08:00
morris
153e819e8a pcnt: add rotary encoder example 2020-10-19 11:56:18 +08:00
morris
74d78148bc pcnt: add pcnt peripheral signal connections
pcnt: fix bug in clear interrupt status
2020-10-19 11:56:18 +08:00
Claudio Jeker
669331d0c4 pcnt: properly clear interrupt status in pcnt_intr_service
status is 0 when pcnt_hal_clear_intr_status() is called and so the
interrupt will be triggered immediatly again. Store the original
status and pass this as mask to pcnt_hal_clear_intr_status().

Merges https://github.com/espressif/esp-idf/pull/5929
2020-10-19 11:08:06 +08:00
Michael (XIAO Xufeng)
c0887582a2 adc_test: fix the failure caused by low expected middle value 2020-10-18 10:32:04 +08:00
Michael (XIAO Xufeng)
1966f00f0b soc: updates caps usage
We should define caps as 1 if true. When use the caps macros, #if and
 #if ! should be used instead of #ifdef/#ifndef.
2020-10-17 16:10:17 +08:00
Michael (XIAO Xufeng)
647dea9395 soc: combine xxx_caps.h into one soc_caps.h
During HAL layer refactoring and new chip bringup, we have several
caps.h for each part, to reduce the conflicts to minimum. But this is
The capabilities headers will be relataive stable once completely
written (maybe after the featues are supported by drivers).

Now ESP32 and ESP32-S2 drivers are relative stable, making it a good
time to combine all these caps.h into one soc_caps.h

This cleanup also move HAL config and pin config into separated files,
to make the responsibilities of these headers more clear. This is
helpful for the stabilities of soc_caps.h because we want to make it
public some day.
2020-10-17 16:10:15 +08:00
Michael (XIAO Xufeng)
ecca44df93 Merge branch 'bugfix/fix_adc-dma_reading_gap_for_esp32' into 'master'
bugfix(adc): missing ranges of ADC-DMA codes in ESP32

Closes DIG-53

See merge request espressif/esp-idf!10521
2020-10-16 23:02:35 +08:00
Angus Gratton
67baa8371a Merge branch 'feature/rename_analog_i2c_files' into 'master'
feature(rtc): rename i2c_xxx to regi2c_xxx

See merge request espressif/esp-idf!10672
2020-10-15 11:16:14 +08:00
Angus Gratton
3a959ca3e3 Merge branch 'bugfix/ci_driver_gpio_config_s2' into 'master'
driver test: Don't use ESP32-S2 CS1 pin for output test

Closes IDFCI-112

See merge request espressif/esp-idf!10835
2020-10-15 06:28:20 +08:00
fuzhibo
6773df88f2 feature(rtc): rename i2c_xxx to regi2c_xxx 2020-10-14 21:15:24 +08:00
Angus Gratton
ba3a6f68b4 driver test: Don't use ESP32-S2 CS1 pin for output test
On a ESP32-S2 with PSRAM attached, this may cause a crash
2020-10-14 16:18:55 +11:00
Felipe Neves
3057b76a7e tests: re-add all disabled tests and all disabled configurations 2020-10-14 16:11:49 +11:00
Felipe Neves
f3783ba258 app_trace/sysview: fixed freertos tracing calling plus sync apptrace component with the master branch version
docs: remove reference to backported features in freertos 10 api-reference.
2020-10-13 23:52:03 +00:00
Felipe Neves
bd9b921713 heap_tlsf: added implementation of TLSF allocator
heap: ported tlsf allocator into multi heap

heap_host_tests: added tlsf allocator into host test

heap_host_test: update freebytes after using free

heap_tests: tlsf now passing on host tests without poisoning

multi_heap: added support for memalign using tlsf implementation

heap_caps: removed heap_caps_aligned_free

heap/test: fixed broken aligned alloc test build

heap: added poisoning pattern when blocks are being merged

heap/tests: added timing tests for memory allocation

heap: reduced tlsf structure overhead

heap/tlsf: made all short functions inside of tlsf  module as inline to improve timings

heap: moved tlsf heap routines outside of flash memory

newlib: linked multiheap memalign with newlib memalign function

heap: moved block member functions to a separate file so multi_heap can use the functions

heap/test: improved the tlsf timing test

heap/test: added memalign on aligned alloc tests

heap: moved tlsf configuration constants to a separated file

heap: added random allocations test with timings

heap: modified the calculation of heap free bytes

heap: make aligned free true deprecated functions and update their documentation

heap: add extra assert after successive mallocs on small allocation host test

heap: remove legacy aligned alloc implementation.

performance: added malloc and free time performance default values
2020-10-13 23:52:03 +00:00
Michael (XIAO Xufeng)
fc7433d610 Merge branch 'feature/twai_isr_runs_with_cache_disabled' into 'master'
TWAI: ISR runs when cache is disabled

See merge request espressif/esp-idf!9920
2020-10-12 20:18:36 +08:00
fuzhibo
9cd5e6f8c9 bugfix(adc): missing ranges of ADC codes in ESP32 2020-10-12 07:41:03 +00:00
Darian Leung
4c57f50fe4 TWAI: ISR runs when cache is disabled
This commit adds the feature where the TWAI ISR will continue to
run even if the cache is disabled. Whilst cache is disabled, any
received messages will go into the RX queue, and any pending TX
messages in the TX queue will be transmitted. This feature should
be enabled using the CONFIG_TWAI_ISR_IN_IRAM option.
2020-10-10 14:19:32 +08:00
Ivan Grokhotkov
8c246fd4f3 driver: add diagnostic information into UART test, enable flow control 2020-10-02 17:33:35 +02:00
Armando
1393520e78 spi_slave: fix crash issue caused by setting cs to -1
Setting cs num to -1 means cs pin is not connected. But passing the value -1 to the
spicommon_cs_initialize() will lead to program crash caused by "array index out
of bounds". We expect the driver to execute well but the driver should not be in
charge of users' behaviour, so this commit prevents the crash.

https://github.com/espressif/esp-idf/issues/5784
2020-09-30 11:40:52 +08:00
Michael (XIAO Xufeng)
c7264f04c6 Merge branch 'bugfix/fix_incorrect_i2s_pdm_clk_issue' into 'master'
Bugfix(I2S):  Fix I2S PDM clock incorrect issue when using APLL.

Closes IDFGH-3423 and IDFGH-3106

See merge request espressif/esp-idf!9101
2020-09-28 11:35:31 +08:00
Renz Bagaporo
6462f9bfe1 esp32, esp32s2: create esp_pm component 2020-09-25 05:24:10 +00:00
Michael (XIAO Xufeng)
4b95f7efa8 Merge branch 'feature/spi_dma_hal_ll_refactor' into 'master'
spi: refactor DMA ll layer functions

Closes IDFGH-3538 and IDFGH-2555

See merge request espressif/esp-idf!9929
2020-09-23 15:32:41 +08:00
morris
9fa06719fa global: enable build uinit test for esp32-s3 2020-09-22 15:15:03 +08:00
morris
61f89b97c6 bringup esp32-s3 on FPGA 2020-09-22 15:15:03 +08:00
Armando
59e350b195 spi: seperate the pointer for the TX and RX DMA 2020-09-21 20:33:56 +08:00
Armando
27a6f2666a spi_master: refactor hal context structures
This commit seperates the hal context into different configuration
structures based on their members' definitions. Through refactoring
spi_master.c, the device related configuration should be passed in and
set each time before a new transaction. The transaction related
configuration now is a local variable in case of the fact that error
occurs without any notice when user forgets to pass new transaction
configuration in (which means the old driver will use the trans_config
that is saved from last transaction).

Besides, via above refactor, this commit fixs a bug which leads to
wrong cs polarity setting.
Closes https://github.com/espressif/esp-idf/pull/5490

Moreover, via above refactor, this commit also fixs a bug about duplex
mode switching when multiple devices are added to the bus.
Closes https://github.com/espressif/esp-idf/issues/4641
2020-09-21 20:32:41 +08:00
Michael (XIAO Xufeng)
286ccc600e Merge branch 'bugfix/spi_slave_hd_callback_judge' into 'master'
spi_slave_hd: Prevent NULL callback from being called

See merge request espressif/esp-idf!9998
2020-09-14 22:43:33 +08:00
Michael (XIAO Xufeng)
b65d3e51aa Merge branch 'bugfix/add_return_in_uart_wait_tx_done' into 'master'
bugfix(UART): Add return in uart_wait_tx_done

See merge request espressif/esp-idf!10193
2020-09-14 10:37:17 +08:00
Ivan Grokhotkov
b6467257b9 Merge branch 'feature/cmock_component' into 'master'
cmock as component replacing unity

See merge request espressif/esp-idf!9859
2020-09-10 16:06:20 +08:00
Chen Yi Qun
b9a0d509a2 UART: Add return in uart_wait_tx_done
uart_wait_tx_done quit due to timeout but without return ESP_ERR_TIMEOUT.
2020-09-08 02:45:14 +00:00
Zhang Hu
6a5faa0fd7 Driver(I2S): Fix I2S PDM clock incorrect issue when using APLL.
closes https://github.com/espressif/esp-idf/issues/5127

closes https://github.com/espressif/esp-idf/issues/5386
2020-09-07 08:08:22 +00:00
Michael (XIAO Xufeng)
4941cf58d0 Revert "ci: temporarily disable RS485 related tests"
This reverts commit 983220e216
2020-09-04 12:57:08 +08:00
Michael (XIAO Xufeng)
91af5eaf4f Merge branch 'refactor/twai_hal_state' into 'master'
Refactor TWAI HAL to store state information

Closes IDF-1633

See merge request espressif/esp-idf!9789
2020-09-03 23:22:30 +08:00
Wu Bo Wen
658b56a690 doc/adc: modifications in the adc documentation and adc headers 2020-09-02 11:30:48 +00:00
Jakob Hasse
20c068ef3b cmock: added cmock as component
* changing dependencies from unity->cmock
* added component.mk and Makefile.projbuild
* ignore test dir in gen_esp_err_to_name.py
* added some brief introduction of CMock in IDF
2020-09-02 16:38:37 +08:00
Darian Leung
7398390049 TWAI: Track HW state in HAL
This commit refactors the TWAI HAL such that it
now tracks  harwdare state instead of the driver
layer. Some HAL and LL cleanup was also done.
2020-09-02 13:03:41 +08:00
Armando
d3d4dd9357 spi_slave_hd: fix issue with adding callback calling judgement 2020-09-02 03:20:42 +00:00
Ivan Grokhotkov
fdba279970 Merge branch 'ci/adc_calib_test_failures' into 'master'
bugfix/CI: fix for adc-calib test failures

See merge request espressif/esp-idf!10215
2020-09-02 03:05:27 +08:00
Wu Bo Wen
a8b5592762 ci: quick fix for adc-calib failures 2020-09-01 14:01:58 +08:00
Michael (XIAO Xufeng)
5425ef4ee4 hal: extract hal component from soc component 2020-09-01 13:25:32 +08:00
Michael (XIAO Xufeng)
2b323e7180 Merge branch 'bugfix/fix_dac_driver_ut' into 'master'
Driver(dac): fix DAC-DMA driver and unit test

Closes IDF-1407

See merge request espressif/esp-idf!8814
2020-08-31 00:05:34 +08:00
fuzhibo
0914dfbb6a dfiver(dac): add dac dma driver and unit test 2020-08-26 06:23:24 +00:00
fuzhibo
bd92e95160 driver(adc): add adc-dma code for esp32 2020-08-26 03:54:02 +00:00
Armando
fc6010c959 spi_master: add dummy check when both mosi and miso are set
Closes https://github.com/espressif/esp-idf/issues/2715
2020-08-18 10:30:30 +08:00
Armando
e58ce2141d spi_master: rename the hal layer function that calculates clock and timing 2020-08-17 17:04:07 +08:00
Michael (XIAO Xufeng)
ceb690886e Merge branch 'feature/esp32s2_adc_calib_V1' into 'master'
driver/adc: support for esp32s2 adc calibration scheme (RTC High Priority)

Closes IDFGH-3500

See merge request espressif/esp-idf!10004
2020-08-14 13:42:39 +08:00
Wu Bo Wen
6a0951ecb2 driver/adc: support for esp32s2 adc calibration scheme
ESP32 lets the user choose from using Vref, Lookup Table, and Two-Point Calibration. In ESP32S2 only two-point calibration is supported. This commit support these changes in idf.

Closes https://github.com/espressif/esp-idf/issues/5455
2020-08-13 17:27:03 +08:00
Michael (XIAO Xufeng)
3b617dd94c Merge branch 'bugfix/fix_bugs_in_rtcio_unit_test' into 'master'
bugfix(ut): fix rtcio pullup/pulldown and rtcio hold unit test

Closes IDFCI-96

See merge request espressif/esp-idf!10015
2020-08-12 11:21:34 +08:00
Chen Yi Qun
f9b167103f bugfix(ut): fix rtcio pullup/pulldown and rtcio hold unit test 2020-08-11 18:43:54 +08:00
Darian Leung
fdbda1ce78 TWAI: Simplify caps header
This commit simplies the defines made in the _caps.h header. Kconfig
option dependencies were moved into the LL, and the check for a
valid BRP has bee simplified.
2020-08-10 17:01:32 +08:00
Michael (XIAO Xufeng)
37cd6249d8 Merge branch 'bugfix/remove_FILE_from_log_messages' into 'master'
bugfix: remove __FILE__ from log messages

Closes IDFGH-3709 and IDFGH-3712

See merge request espressif/esp-idf!9852
2020-08-10 11:43:38 +08:00
dongyou
97ae87df41 wifi, bt: move esp_phy_common_clock_disable into periph_ctrl and put it into IRAM
Replace periph_module_enable/disable by periph_wifi_bt_common_module_enable which are in IRAM.
AddIRAM_ATTR periph_ll_wifi_bt_module_enable_clk_clear_rstandIRAM_ATTR periph_ll_wifi_bt_module_disable_clk_set_rstto fit O0 optimization level.
Delete duplicated spinlock and counter.
2020-08-05 11:04:16 +08:00
Chen Yi Qun
caaf62bdad driver, http_client, web_socket, tcp_transport: remove __FILE__ from log messages
__FILE__ macro in the error messages adds full paths to the production binarys, remove __FILE__ from the ESP_LOGE.

Closes https://github.com/espressif/esp-idf/issues/5637
Merges https://github.com/espressif/esp-idf/pull/5638
2020-08-03 15:21:36 +08:00
Darian Leung
f790e0cc28 TWAI: Remove asserts used for program logic
This commit fixes the bug where TWAI driver program logic was being
called in assert(), thus leading to the logic being omitted in
release builds.
2020-07-30 15:25:11 +08:00
Michael (XIAO Xufeng)
6434c1e2bd Merge branch 'feat/esp_flash_enable_s2_ut' into 'master'
esp_flash: fix several issues and enable unit test for ESP32-S2

Closes IDF-1409

See merge request espressif/esp-idf!8259
2020-07-28 18:15:41 +08:00
Ivan Grokhotkov
16c73edc67 Merge branch 'refactor/add_alias_name_for_ets_common_api' into 'master'
esp_rom: extract common ets apis into esp_rom_sys.h

See merge request espressif/esp-idf!9701
2020-07-28 15:04:55 +08:00
Michael (XIAO Xufeng)
395a51b441 Merge branch 'bugfix/fix_touch_sensor_api' into 'master'
driver(touch): fix touch sensor driver redundancy

Closes IDF-1850

See merge request espressif/esp-idf!9273
2020-07-27 22:20:10 +08:00
Michael (XIAO Xufeng)
cef10fdfef Merge branch 'feature/uart_error_string_mod' into 'master'
uart: Improve error log description in UART rx buffer size

Closes IDFGH-3579

See merge request espressif/esp-idf!9466
2020-07-27 16:35:20 +08:00
Michael (XIAO Xufeng)
1aabab0160 Merge branch 'bugfix/i2c_const_function_signature' into 'master'
I2C: add const to signature of master_write function

Closes IDFGH-3324

See merge request espressif/esp-idf!9306
2020-07-27 16:31:20 +08:00
morris
2917651478 esp_rom: extract common ets apis into esp_rom_sys.h 2020-07-27 15:27:01 +08:00
Michael (XIAO Xufeng)
8165025320 spi test: replace several SPIRAM_SUPPORT with SPIRAM configs
The previous config option is renamed to ESP32_SPIRAM_SUPPORT, which
cannot cover the ESP32-S2 case.
2020-07-27 12:27:05 +08:00
fuzhibo
1568b6913d driver(touch): fix touch sensor driver redundancy 2020-07-27 03:37:29 +00:00
morris
345606e7f3 esp_rom: extract common uart apis into esp_rom_uart.h 2020-07-17 16:00:59 +08:00
Michael (XIAO Xufeng)
f8f2f7c297 Merge branch 'bugfix/touch_sensor_denoise_ci_for_esp32s2' into 'master'
ut: fix touch sensor denoise ci fail

Closes IDFCI-46

See merge request espressif/esp-idf!9571
2020-07-14 11:04:06 +08:00
Michael (XIAO Xufeng)
f6dd63d03d spi_slave_hd: new driver for spi slave in half duplex mode 2020-07-11 00:00:50 +08:00
Michael (XIAO Xufeng)
a50ea8ad55 spi: allow force pins being configured throug GPIO matrix 2020-07-11 00:00:47 +08:00
fuzhibo
75212b5055 ut: fix touch sensor denoise ci fail 2020-07-10 15:10:18 +08:00