Commit graph

940 commits

Author SHA1 Message Date
Michael (XIAO Xufeng)
e04bb43b9f spi: suppress spi_bus_lock_touch log level
The log in the spi_bus_lock_touch may be annoying. This commit suppress 
the log level, and make the log visible only when the device altered.

Resolves https://github.com/espressif/esp-idf/issues/5056
2020-05-07 00:32:24 +08:00
Shubham Kulkarni
34d41645d3 touch_sensor.c: Fix datatype of argument for timer callback function 2020-05-04 13:26:58 +05:30
Michael (XIAO Xufeng)
9d98111652 Merge branch 'bugfix/spi_bus_lock_missing_semphrstatic' into 'master'
spi: fix config break and reduce overhead of the bus lock on SPI1

Closes IDFGH-3017

See merge request espressif/esp-idf!8221
2020-04-27 12:57:19 +08:00
morris
91e62f4e37 timer_group: update hal api && fix intr_enable
timer group interrupt enable is controled by level_int_ena instead of int_ena

Closes https://github.com/espressif/esp-idf/issues/5103
2020-04-23 19:29:15 +08:00
morris
e0b9f7be6d periph_clk_gating: add reference counter 2020-04-23 19:29:15 +08:00
michael
fdf983e0c4 spi: fix config break and reduce overhead of the bus lock on SPI1
The SPI bus lock on SPI1 introduces two side effects:

1. The device lock for the main flash requires the
`CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION` to be selected, however this
option is disabled by default in earlier IDF versions. Some developers
may find their project cannot be built by their old sdkconfig files.

2. Usually we don't need the lock on the SPI1 bus, due to it's
restrictions. However the overhead still exists in this case, the IRAM
cost for static version of semaphore functions, and the time cost when
getting and releasing the lock.

This commit:

1. Add a CONFIG_SPI_FLASH_BYPASS_MAIN_LOCK option, which will forbid the
space cost, as well as the initialization of the main bus lock.

2. When the option is not selected, the bus lock is used, the
`CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION` will be selected explicitly.

3. Revert default value of `CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION`
to `n`.

introduced in 49a48644e4.

Closes https://github.com/espressif/esp-idf/issues/5046
2020-04-22 16:06:13 +08:00
dowster
7b02fdf45a Fix typo with sigmadelta.h #ifdef 2020-04-17 22:52:00 -05:00
Jiang Jiang Jian
7d0f1536e4 Merge branch 'bugfix/fix_adc_init_code_setting_for_esp32s2' into 'master'
driver(adc): fix adc calibration for esp32s2

See merge request espressif/esp-idf!8209
2020-04-04 16:06:16 +08:00
fuzhibo
406b8f423d driver(adc): add adc initial code before app_main for esp32s2.
update phy v301
2020-04-04 10:15:30 +08:00
Michael (XIAO Xufeng)
a0e66fef08 spi: fix the memory accessed while cache disabled issue in the bus lock when log level is verbose
When CONFIG_LOG_DEFAULT_LEVEL is verbose, the ESP_(EARLY_)LOGx will try
to print with format string and tag out of the DRAM while the cache is
disabled. This commit puts the TAG into DRAM, and uses the
'ESP_DRAM_LOGx` to fix the cache miss bug.

Also fixes a LoadProhibited issue when last_dev is NULL.
2020-04-03 15:04:52 +02:00
fuzhibo
baa7898e35 driver(adc/dac): fix adc dac driver for esp32s2
1. update register file about adc; 2. fix adc driver; 3. add UT for adc/dac;

See merge request espressif/esp-idf!7776
2020-04-01 12:41:51 +08:00
fuzhibo
dfbb108ab4 Driver(touch): fix touch sensor driver for esp32s2.
1.update touch sensor driver for esp32s2;
2.update unit test for touch sensor;
3.update register files about touch sensor;
2020-04-01 12:41:51 +08:00
Alex Lisitsyn
3abdd2207d freemodbus: fix long buffer failure
check master read write functions with array of registers)
fix master serial processing code and modbus controller to work with register array
modbus_master: add reading and writing of test value array (58 registers) to check failure is gone
remove parameter temporary buffer from modbus controller to allow more than 24 byte writes
driver: fix issue with TOUT feature
driver: fix uart_rx_timeout issue
driver: fix issue with rxfifo_tout_int_raw not triggered when received fifo_len = 120 byte and all bytes read out of fifo as result of rxfifo_full_int_raw
driver: add function uart_internal_set_always_rx_timeout() to always handle tout interrupt
examples: call uart_internal_set_always_rx_timeout() to handle tout interrupt correctly
examples: update examples to use tout feature
driver: reflect changes of uart_set_always_rx_timeout() function, change uart.c
driver: change conditions to trigger workaround for tout feature in uart.c
driver: change uart_set_always_rx_timeout()
freemodbus: fix tabs, remove commented code
driver: remove uart_ll_is_rx_idle()
2020-03-30 22:05:48 +08:00
Michael (XIAO Xufeng)
16d6604ab4 Merge branch 'feature/spi_unit_test_slave_byte_length' into 'master'
spi: add unit test for slave receiving length

See merge request espressif/esp-idf!6357
2020-03-30 10:41:45 +08:00
Michael (XIAO Xufeng)
a304421124 Merge branch 'feat/spi_bus_lock' into 'master'
SPI: support running SPI master and esp_flash on the same bus

See merge request espressif/esp-idf!6520
2020-03-27 19:59:43 +08:00
Alex Lisitsyn
16e6e63694 driver: fix driver set rx timeout feature of uart
tout_thr - move calculation and masking into hal layer update driver and uart_ll (add uart_ll_set_rx_tout)
move tout calculation into uart_ll
move calculation of time out in bit time for esp32s2 into low level uart_ll.h file
move uart_hal_get_symb_len() into hal
update set_rx_timeout() to warn user about incorrect value
update HAL, LL 1
fix uart_xx_set_rx_tout() to convert symbol time into bit time
update param description
update tout calculation in LL
update uart_hal_get_max_rx_timeout_thrd() and uart_ll_get_max_rx_timeout_thrd()
2020-03-27 16:20:21 +08:00
Michael (XIAO Xufeng)
c91b53377b Merge branch 'bugfix/fix_uart_driver_missing_txfifo_reset_issue' into 'master'
bugfix(UART):  fix uart driver missing txfifo reset issue.

Closes IDFGH-2848

See merge request espressif/esp-idf!7992
2020-03-27 15:55:02 +08:00
Michael (XIAO Xufeng)
49a48644e4 spi: allow using esp_flash and spi_master driver on the same bus 2020-03-26 22:08:26 +08:00
Michael (XIAO Xufeng)
826cc7ecb6 Merge branch 'feature/bringup_723_cmake_rmt_driver_update' into 'master'
RMT new features in ESP32S2

Closes IDF-1286

See merge request espressif/esp-idf!7401
2020-03-26 10:24:18 +08:00
Michael (XIAO Xufeng)
661f4c430d Merge branch 'feature/esp32s2_i2c_driver' into 'master'
Feature:  Add esp32-s2 I2C driver.

Closes IDF-1278 and IDF-1026

See merge request espressif/esp-idf!7680
2020-03-26 10:20:40 +08:00
fuzhibo
340563f479 Driver(touch): fix touch sensor driver for esp32s2.
1.update touch sensor driver for esp32s2;
2.update unit test for touch sensor;
3.update register files about touch sensor;
2020-03-25 22:45:57 +08:00
morris
4fc16e2374 rmt: prefix caps name with SOC_ 2020-03-25 17:14:00 +08:00
morris
0c17af3ea4 rmt: support tx loop count 2020-03-25 17:14:00 +08:00
morris
dc91aa9786 rmt: support tx in a group 2020-03-25 17:13:59 +08:00
morris
fa167eb0c5 rmt: test tx/rx ping-pong mode 2020-03-25 17:13:47 +08:00
morris
855b316045 rmt: better support rx demodulation 2020-03-25 13:19:03 +08:00
morris
c91565d538 rmt: update rmt ll APIs 2020-03-25 13:19:03 +08:00
chenjianqiang
ecbe0dad1b driver/rmt: new features on esp32s2
1. add receive carrier remove function
2. add pingpong receive function
2020-03-25 13:19:03 +08:00
houwenxiang
886745326e driver(UART): fix uart driver missing txfifo reset issue.
closes https://github.com/espressif/esp-idf/issues/4908
2020-03-25 01:48:46 +08:00
Renz Bagaporo
3d0967a58a test: declare requirements and include dirs private 2020-03-23 10:58:50 +08:00
Andrew
3bb41fd67e spi: add unit test for slave receiving length 2020-03-11 13:24:30 +08:00
Roland Dobai
15884eccf2 Add multi-target support for performance tests 2020-03-09 13:41:56 +01:00
Angus Gratton
a9854f7085 Merge branch 'feature/rmt_clock_support_ref_tick' into 'master'
rmt: support ref tick && refactor unit test && re-enable unit test on ESP32-S2

Closes IDFGH-1715

See merge request espressif/esp-idf!7614
2020-03-06 15:03:52 +08:00
morris
acd4d4a40b unit test using internal signal connection 2020-03-03 20:14:46 +08:00
morris
07088c6446 rmt: disable carrier feature by default 2020-03-03 20:14:46 +08:00
morris
0e4d82bc55 rmt: support REF_TICK as channel clock source
Closes https://github.com/espressif/esp-idf/pull/3952
2020-03-03 20:14:46 +08:00
xiongyu
b3ae9fa978 bugfix(i2s): Updated ESP32-S2 ADC DAC support
* Delete the relevant codes of ADC DAC of ESP32-S2.
2020-03-03 12:59:30 +08:00
fuzhibo
3ad5138dd8 fix coexist i2s_adc and rtc_adc 2020-03-03 11:58:53 +08:00
xiongyu
faf898b659 bugfix(i2s): fix driver ut i2s
* Add test support for ESP32S2

* Add loop back test

* Support chip internal connection, no external wiring required.

* Delete the relevant codes of PDM of ESP32-S2 ll layer.

* fix dac dma mode issue
2020-03-03 11:58:53 +08:00
morris
580ce8fa4a driver: clean pcnt.h i2s.h 2020-03-02 19:31:29 +08:00
Michael (XIAO Xufeng)
7f8c827326 Merge branch 'bugfix/fix_driver_ut_pcnt' into 'master'
bugfix(pcnt): fix driver ut pcnt

See merge request espressif/esp-idf!6891
2020-02-27 11:29:28 +08:00
Michael (XIAO Xufeng)
9d8e590d86 Merge branch 'fix/spi_flash_legacy_on_esp32s2' into 'master'
spi_flash: fix the reading issue using the ROM functions on ESP32-S2

See merge request espressif/esp-idf!7767
2020-02-26 18:04:51 +08:00
xiongyu
4d5c950770 bugfix(pcnt): fix driver ut pcnt
* Let `[ignore] case` return to freedom

  1) Because this test uses its own ISR, we need to release it with `esp_intr_free` instead of `pcnt_isr_service_uninstall`.

  2) `pcnt_evt_queue` needs to be created before the interrupt is registered and needs to be released at the end of each case.

* Add test support for ESP32S2

* Support chip internal connection, no external wiring required.
2020-02-26 16:52:53 +08:00
Michael (XIAO Xufeng)
160d3bd416 Merge branch 'refactor/i2c_const_and_param_check' into 'master'
I2C: const correctness and better param check

See merge request espressif/esp-idf!7582
2020-02-26 16:06:57 +08:00
Jakob Hasse
3bcc6b48af I2C: i2c.h/i2c.c applied new code formatting 2020-02-26 15:12:03 +08:00
michael
f1a4c84e57 GPIO: fix unit test issue on ESP32-S2
Also rename some test variables.
2020-02-26 11:12:09 +08:00
houwenxiang
4883733472 driver(I2C): support esp32-s2 I2C driver. 2020-02-25 21:56:00 +08:00
morris
e9717fc07b periph_ctrl: move target specific into ll files 2020-02-24 14:50:26 +08:00
Jakob Hasse
d230d44e2d I2C: const correctness, checking SDA/SCL GPIOs
* const correctness in i2c_slave_write_buffer()
* i2c_set_pin() additionally checks whether
  SDA and SCL pins are the same number
2020-02-24 14:30:28 +08:00
Paul Abbott
b75e3de447 Bugfix(LEDC): Add missing ledc_set_pin declaration in led.h
Merges https://github.com/espressif/esp-idf/pull/4632
2020-02-19 16:02:33 +08:00