Commit graph

629 commits

Author SHA1 Message Date
Michael (XIAO Xufeng)
75ebfacd28 Merge branch 'bugfix/mcpwm_period_error_v3.2' into 'release/v3.2'
bugfix(mcpwm_period_error): fix the issue of wrong period (backport v3.2)

See merge request espressif/esp-idf!7188
2020-05-25 15:36:11 +08:00
Chen Zheng Wei
65f012d612 mcpwm: fix the issue of wrong period (backport v3.2) 2020-04-28 21:40:17 +08:00
morris
ec50038f84 timer_group: 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-28 12:43:12 +08:00
dowster
eee46733f0 Fix typo with sigmadelta.h #ifdef 2020-04-28 12:43:02 +08:00
xiongyu
393464d45e bugfix(driver): fix i2s and timergroup some issues
* fix i2s and timergroup dev array used by isr crash issue

* Closes IDFGH-2432

* Closes https://github.com/espressif/esp-idf/issues/4545

* fix i2s adc data inv issue

* Closes IDFGH-2444

* Closes https://github.com/espressif/esp-idf/issues/4557
2019-12-31 14:58:30 +08:00
Darian Leung
09ae962c33 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-12-16 07:45:59 +00:00
Ivan Grokhotkov
077bd351e4 Merge branch 'bugfix/can_driver_assertions_v3.2' into 'release/v3.2'
drivers/can: fix skipped function calls when assertions disabled (backport v3.2)

See merge request espressif/esp-idf!6407
2019-10-30 03:53:45 +08:00
Darian Leung
896ba6a83e can: Fix reset mode entry and exit calls
This commit fixes multiple bugs caused by incorrect calls to
can_enter_reset_mode() and can_exit_reset_mode. Example test
scripts also updated to match new runners.
2019-10-28 15:35:42 +08:00
Angus Gratton
696a9fa0ba Merge branch 'bugfix/ticks_to_wait_for_uart_and_i2c_v3.2' into 'release/v3.2'
driver: Fix ticks_to_wait for uart and i2c (v3.2)

See merge request espressif/esp-idf!5248
2019-10-22 13:18:00 +08:00
Ivan Grokhotkov
cbe8274651 drivers/can: fix skipped function calls when assertions disabled
When CONFIG_FREERTOS_ASSERT_DISABLE is set, the function calls wrapped
inside the assertion macros would be removed from the code.

Closes https://github.com/espressif/esp-idf/issues/4143
2019-10-18 11:28:35 +02:00
Konstantin Kondrashov
db8ddf050f driver: Add uart and i2c UTs to check ticks_to_wait in some functions 2019-10-16 15:18:31 +08:00
Konstantin Kondrashov
e64f3d43ad i2c: Fix ticks_to_wait when 0 or time expired
Closes: https://github.com/espressif/esp-idf/issues/3301

Closes: IDFGH-964
2019-10-16 15:18:31 +08:00
Konstantin Kondrashov
2bd77056bb rmt/driver: Add module reset before enabling 2019-10-16 05:49:26 +00:00
Konstantin Kondrashov
4be011785e pcnt/driver: Add module reset before enabling 2019-10-16 05:49:26 +00:00
Konstantin Kondrashov
5ce96ab227 sdmmc_host/driver: Add module reset before enabling 2019-10-16 05:49:26 +00:00
Konstantin Kondrashov
b8d4a53260 i2s/driver: Add module reset before enabling 2019-10-16 05:49:26 +00:00
Konstantin Kondrashov
fc31437236 can/driver: Add module reset before enabling 2019-10-16 05:49:26 +00:00
Konstantin Kondrashov
dc63c2e9cb uart/driver: Add module reset before enabling
This commit prevents infinite restarts caused due to an interrupt flag
was left uncleared.

Closes: https://github.com/espressif/esp-idf/issues/1981

Closes: IDF-188
2019-10-16 05:49:26 +00:00
Martin Thierer
d56892b563 spi: Put argument of macro SPI_SWAP_DATA_TX/RX in parentheses
Close https://github.com/espressif/esp-idf/pull/3996
2019-09-16 17:40:40 +08:00
redchenjs
548844b5cc Bugfix(i2s): fixed i2s left/right channels swapped issue for release/v3.2.
The right channel data is in the high position, so the I2S_TX_MSB_RIGHT & I2S_RX_MSB_RIGHT bits should be set.
2019-08-26 14:02:27 +08:00
Ivan Grokhotkov
48e5dcd9b5 Merge branch 'power_management/i2s+i2c-v3.2' into 'release/v3.2'
Power management/i2s+i2c (backport v3.2)

See merge request espressif/esp-idf!5863
2019-08-22 23:29:52 +08:00
Sachin Parekh
eeb9a0359c PM: I2S and I2C added in the Power Management docs
Signed-off-by: Sachin Parekh <sachin.parekh@espressif.com>
2019-08-21 18:15:51 +05:30
Sachin Parekh
4cdf488de8 I2S: Enable Power Management locks
Acquires PM_APB_FREQ_MAX lock when carrying any transaction on I2S if
Power Management Framework is enabled.

Signed-off-by: Sachin Parekh <sachin.parekh@espressif.com>
2019-08-21 18:15:41 +05:30
Sachin Parekh
c56f147d48 I2C: Enable Power Management locks
Acquires PM_APB_FREQ_MAX lock when carrying any transaction on I2C if
Power Management Framework is enabled.

Signed-off-by: Sachin Parekh <sachin.parekh@espressif.com>
2019-08-21 18:15:29 +05:30
Michael (XIAO Xufeng)
a393bb6f1b sdio_slave: fix the send_flush infinite loop issue
Also add some helper functions.
2019-08-20 17:00:21 +08:00
Angus Gratton
b7196d21c9 Merge branch 'bugfix/gpio_intr_enable_bug_v3.2' into 'release/v3.2'
bugfix(GPIO): Fixed GPIO  interrupts bug for v3.2

See merge request espressif/esp-idf!5651
2019-07-30 14:10:29 +08:00
kooho
f6a9f76401 bugfix(GPIO): Fixed the bug that GPIO enables interrupts on one core,
but registers interrupt service routines on another core for release/v3.2
2019-07-29 19:22:59 +08:00
Vikram Dattu
13069ecb26 Changed log level for spi_master
There are lot of prints of `Allocate TX buffer for DMA`
Changed these from `ESP_LOGI` to `ESP_LOGD`

Signed-off-by: Vikram Dattu <vikram.dattu@espressif.com>
2019-07-19 10:08:39 +05:30
Mahavir Jain
376377ceca Merge branch 'bugfix/i2s_apll_clock_fix_v3.2' into 'release/v3.2'
driver/i2s: fix apll_clock_rate for different sample rates (v3.2)

See merge request espressif/esp-idf!5449
2019-07-12 11:36:01 +08:00
kooho
7e2465995f bugfix(UART): fixed two UART issues:
1. uart_wait_tx_done works incorrect when sending a byte of data.
2. uart_set_rx_timeout sets an incorrect rx timeout value when ref_tick is enabled.
2019-07-09 14:47:04 +08:00
redchenjs
a4f2283384 i2s: fix a bug when calculating i2s apll parameters
Closes https://github.com/espressif/esp-idf/issues/2634
Closes https://github.com/espressif/esp-idf/issues/3380
Fixes https://github.com/espressif/esp-idf/issues/3407
2019-07-04 18:28:18 +05:30
Michael (XIAO Xufeng)
f21762eeef spi: fix a possible concurrency issue 2019-06-19 12:38:31 +08:00
Michael (XIAO Xufeng)
325fca94c0 spi: fix the bug of connecting SPI peripheral to read-only pins
The requirements of pin capabilites is different for spi master and
slave.  The master needs CS, SCLK, MOSI to be output-able, while slave
needs MISO to be output-able.

Previous code is for master only.

This commit allows to place other 3 pins than MISO on input-only pins
for slaves. Refactoring for spi_common is also included.

Resolves https://github.com/espressif/esp-idf/issues/2455
2019-04-01 18:39:02 +08:00
Angus Gratton
d99d92e170 Merge branch 'bugfix/fix_dig_gpio_unable_hold_bug_v3.2' into 'release/v3.2'
Bugfix/fix digital gpio unable hold bug  (backport v3.2)

See merge request idf/esp-idf!4355
2019-03-06 12:10:38 +08:00
Paul Abbott
929542d4fa driver(rmt): Fixed some RMT related issues.
1. Add missing get function to RMT API: rmt_get_idle_level().
2. Suppress error message from rmt_wait_tx_done() if wait_time==0 (allows for polling).
3. Remove the blank lines between parameter lists.

Merges https://github.com/espressif/esp-idf/pull/2666
2019-02-26 20:46:23 +08:00
kooho
be49c8d841 driver(gpio): fixed digital gpio unable hold bug during deep-sleep for release/v3.2. 2019-02-26 20:20:25 +08:00
Wangjialin
553ba51924 bugfix(i2c): reduce speed of I2C master bus reset routine and release SDA
closes https://github.com/espressif/esp-idf/issues/2494
closes https://github.com/espressif/esp-idf/pull/2493
closes https://github.com/espressif/esp-idf/pull/2496

1. Change bus reset to handle interrupted READ sequences.
2. Slow down I2C to 100khz during reset
3. If a SLAVE device was in a read operation when the bus was interrupted, the SLAVE device is controlling SDA.The only bit during the 9 clock cycles of a byte READ the MASTER(ESP32) is guaranteed control over, is during the ACK bit period.
If the SLAVE is sending a stream of ZERO bytes, it will only release SDA during the ACK bit period. The master(ESP32) cannot generate a STOP unless SDA is HIGH. So, this reset code synchronizes the bit stream with, Either, the ACK bit, Or a 1 bit.
2019-01-22 11:43:55 +08:00
chuck todd
929d98538e 1. Slow down I2C to 100khz During Reset
I am stealing this delay coding from @jeremyherbert #2493 pr.

2. Change Bus Reset to handle interrupted READ sequences.

The current code does not handle interrupted READ cycles.

 If a SLAVE device was in a read operation when the bus was interrupted, the SLAVE device is controlling SDA.

The only bit during the 9 clock cycles of a byte READ the MASTER(ESP32) is guaranteed control over, is during the ACK bit period.

If the SLAVE is sending a stream of ZERO bytes, it will only release SDA during the ACK bit period. The master(ESP32) cannot generate a STOP unless SDA is HIGH.

So, this reset code synchronizes the bit stream with, Either, the ACK bit, Or a 1 bit.

3. fix typo

correct `sda_id` to `sda_io` in `i2c_master_clear_bus()` @ryan-ma found it.  This typo was generated when I manually edited this patch on GitHub, I should have done a Copy/Paste operation!
2019-01-22 11:43:40 +08:00
jeremy
b810b32675 reduce speed of i2c master bus reset routine and release sda 2019-01-22 11:43:28 +08:00
Mahavir Jain
62eb0f4c12 i2s: add (optional) support to clear tx descriptor in underflow case
It has been observed that, in case of underflow (data unavailability) in
I2S transmission, previously filled up tx descriptors continue to get
transmitted on line, causing noise in case of audio use case.

This change adds optional `tx_desc_auto_clear` field during I2S driver intialization
than can zero initialize tx descriptor in case of underflow situation in
interrupt handler itself.

Closes: https://github.com/espressif/esp-idf/issues/1789
(cherry picked from commit 765bf674d0)
2018-12-31 13:42:26 +05:30
Jiang Jiang Jian
bb47146710 Merge branch 'fix/spi_callback_in_iram_v3.2' into 'release/v3.2'
spi: fix the crash when callbacks are not in the IRAM (Backports v3.2)

See merge request idf/esp-idf!3884
2018-12-07 10:37:07 +08:00
Jiang Jiang Jian
4f805d558c Merge branch 'bugfix/fix_uart_read_bug_when_using_dual_core_v3.2' into 'release/v3.2'
driver(uart): fixed uart read error bug when using dual core (backport v3.2)

See merge request idf/esp-idf!3813
2018-12-07 10:35:17 +08:00
Michael (XIAO Xufeng)
44bd6f72bc spi: fix the crash when callbacks are not in the IRAM
Introduced in 9c23b8e5 and 4f87a62f. To get higher speed, menuconfig
options are added to put ISR and other functions into the IRAM.  The
interrupt flag ESP_INTR_FLAG_IRAM is also mistakenly set when the ISR is
put into the IRAM. However callbacks, which are wrote by the user, are
called in the master and slave ISR. The user may not be aware of that
these callbacks are not disabled during flash operations. Any cache miss
during flash operation will cause panic.

Essentially IRAM functions and intrrupt flag ESP_INTR_FLAG_IRAM are
different, the latter means not disabling the ISR during flash
operations.  New bus_config flag intr_flags is offered to help set the
interrupt attribute, including priority level, SHARED, IRAM (not
disabled during flash operations).  It introduced a small BREAK to
IDFv3.1 (but the same as IDFv3.0) that the user has to manually set IRAM
flag now (therefore he's aware of the IRAM thing) to void the ISR being
disabled during flash operations.
2018-12-04 21:35:20 +08:00
kooho
bae0d8a313 driver(i2c): enable I2C master hardware filter by default for release/v3.2 2018-11-28 17:02:04 +08:00
kooho
cfcc0edc33 driver(uart): fixed uart read error bug when using dual core for release/v3.2. 2018-11-28 16:37:59 +08:00
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)
90d229eb6d spi_master: speed up polling performance by putting into IRAM 2018-10-25 12:31:45 +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
Angus Gratton
38bd836d05 Merge branch 'feature/cmake-unit-test' into 'master'
cmake: add unit tests build support

See merge request idf/esp-idf!3003
2018-10-22 16:29:15 +08:00
Anton Maklakov
e3fce506b8 test_spi_slave: fix warnings about unused identifiers 2018-10-21 15:11:45 +08:00