Commit graph

594 commits

Author SHA1 Message Date
kooho a9c1124763 driver(uart): fixed uart read error bug when using dual core.
closes https://github.com/espressif/esp-idf/issues/2204
2018-11-27 20:53:26 +08:00
Mahavir Jain 765bf674d0 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
2018-11-23 14:31:09 +05:30
kooho 33138a3dec driver(i2c): enable I2C master hardware filter by default. 2018-11-23 10:27:59 +08:00
Michael (XIAO Xufeng) 8cddfa35b8 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-11-20 13:07:13 +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 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
michael 26626dfbf2 spi: add documents explicitly showing the executing core of the ISR
It is an ESP specific FreeRTOS feature that the ISR is always executed
on the core which calls the interrupt register function. In the SPI
driver, the function is always called in the bus initialization
function.

Hence, the ISR will be executed on the core which initialize the driver.

If the core is starved due to higher priority ISRs, or the interrupt is
disabled on the core (spinlock called, etc.), the ISR will not get
executed and SPI transactions will not be handled.

(MINOR CHANGE)

Resolves https://github.com/espressif/esp-idf/issues/2432.
2018-11-13 11:49:31 +08:00
michael a52ab8ca87 spi_master: modify the error msg a little when over freq limit
The MISO signal will be delayed if the GPIO matrix is enabled.
However, delay also comes from the slave.

Previous code only considers the former case, and assume the frequency
limitations is only violated when GPIO matrix is used.

Now we are able to calculate the freq limit when extenal MISO delay is
given (feature introduced in 9c6c6ec34ab0641ace89aeb9b1a133eb6fae1a18).
The frequency limit is lower when the external MISO delay is large, and
the limit is likely to be violated even with IOMUX.

Resolves https://github.com/espressif/esp-idf/issues/2690.
2018-11-13 11:49:31 +08:00
Ivan Grokhotkov 621e316725 Merge branch 'feat/psram_support_hspi' into 'master'
esp32: support to use hspi to output clock for 4M psram

See merge request idf/esp-idf!3377
2018-11-06 20:34:41 +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) 9b5d0f3322 spi: shown owner of spi host explicitly 2018-10-29 20:22:44 +08: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
Renz Bagaporo cc774111bf cmake: Add support for test build 2018-10-20 12:07:24 +08:00
Ivan Grokhotkov 0663ab7609 Merge branch 'feature/uart_rs485_test' into 'master'
driver: rs485 test support

See merge request idf/esp-idf!2701
2018-10-19 13:05:55 +08:00
Angus Gratton 159ff6e08e unit tests: Only initialise tcpip_adapter() when needed by the test
Prevents unexpected memory allocations when running tests which
don't require tcpip_adapter.
2018-10-17 22:53:46 +00:00
Alex Lisitsyn 5b7b64b946 driver: rs485 test support (remove timeout tag)
Adds test functionality with TEST_CASE_MULTIPLE_DEVICES() macro for RS485 test support.
2018-10-17 12:47:12 +02:00
Alex Lisitsyn 61bc733791 driver: rs485 test support
Adds test functionality with TEST_CASE_MULTIPLE_DEVICES() macro for RS485 test support.
2018-10-17 12:45:56 +02:00
Krzysztof Budzynski cd5f8bcf74 MCPWM API doc update 2018-10-10 08:15:23 +08:00
Angus Gratton 05c510b44e Merge branch 'test/spi_slave_psram_disable' into 'master'
test: disable the spi slave startup test when psram is enabled

See merge request idf/esp-idf!3373
2018-10-08 16:28:41 +08:00
michael 6b180f70ac test: modify the command/address test a bit to test the LSBFIRST feature 2018-10-04 15:03:26 +08:00
michael e5ed450d95 spi: move gpio direction config to common func for coinsistence
(MINOR CHANGE)
2018-10-04 14:57:31 +08:00
Michael (XIAO Xufeng) 2600f43822 spi_master: fix the command and address field when LSB_FIRST enabled
Resolves https://github.com/espressif/esp-idf/issues/2444.
2018-10-04 14:57:30 +08:00
michael f4d4183000 test: disable the spi slave startup test when psram is enabled 2018-09-26 17:55:37 +08:00
michael d4071a7c19 sdio_slave: fix the ret_queue crash issue when being reset by the master 2018-09-25 20:30:25 +08:00
Michael (Xiao Xufeng) 4af51833f3 spi_master: add new polling mode to decrease time cost each transaction 2018-09-20 19:46:46 +08:00
Mahavir Jain 152043d469 esp_ringbuf: move ringbuf to seperate component
Signed-off-by: Mahavir Jain <mahavir@espressif.com>
2018-09-17 17:04:57 +05:30
Angus Gratton 62c3218981 Merge branch 'fix/spi_slave_free_cs' into 'master'
spi_slave: fix the issue rx dma get broken by master unexpected transaction

See merge request idf/esp-idf!3207
2018-09-13 13:50:56 +08:00
Angus Gratton 500ee99219 Merge branch 'bugfix/fix_mcpwm_api_mismatch_bug' into 'master'
driver(mcpwm): Fix  some mcpwm related bug

See merge request idf/esp-idf!2510
2018-09-12 14:59:02 +08:00
Renz Christian Bagaporo d9939cedd9 cmake: make main a component again 2018-09-11 09:44:12 +08:00
michael 8f88a81f30 sdio_slave: fix the recv crash when trans finish and load at the same time 2018-09-10 13:06:54 +08:00
He Yin Ling 6f5820814f Merge branch 'test/driver_case_review' into 'master'
Test/driver case review

See merge request idf/esp-idf!3206
2018-09-07 16:48:59 +08:00
Angus Gratton 4eeed31a04 Merge branch 'feature/cmake' into 'master'
Merge experimental CMake support to master

See merge request idf/esp-idf!3024
2018-09-07 13:44:17 +08:00
michael 2d748b5d38 spi_slave: fix the issue rx dma get broken by master unexpected transaction 2018-09-07 12:04:55 +08:00
houchenyao 0cfed0b79b rmt test: add the case for bug in github[#1815] 2018-09-06 19:43:30 +08:00
houchenyao 47fcdeaa0b rmt test: add case test test the bug of re-install problem
add pending bug case:rmt_tx_stop function cause the re-install fail when rmt_config_t.tx_config.loop_en==true
2018-09-06 19:43:30 +08:00
houchenyao 09dd1034de rmt test: add case to check memory block.
add RMT channel num and memory block relationship test case to check the memory block range is used in right way.
2018-09-06 19:43:30 +08:00
houchenyao 836d01dcea ledc test: ignore one case.
a bug caused by pcnt. it will fail randomly caused by PCNT bug. It will open when PCNT problem is resolved
2018-09-06 19:43:30 +08:00
houchenyao f647ea81cc pcnt test: ignore pcnt two test cases
a bug caused by pcnt. these two cases has about 10% fail ratio. they fail randomly in CI. stress test needed. they are ignored until this bug fixed.
2018-09-06 19:42:20 +08:00
houchenyao 22ac8cf424 ledc test: test low speed mode frequency.
remove the comment to test the scenario that ledc in low speed mode frequency can be changed, to make sure the bug has been resolved
2018-09-06 17:44:39 +08:00
houchenyao 98c868ff09 gpio test: add GPIO multi-level interrupt test
add case to test the bug of v3.0. If we trigger the level interrupt more than once, will cause the interrupt be triggered many times
2018-09-06 17:43:23 +08:00
Ivan Grokhotkov 002d913ab6 uart: add function to set light sleep wakeup threshold 2018-09-06 15:40:46 +08:00
Ivan Grokhotkov 1c5522575e driver/gpio: support wakeup function for RTC IOs 2018-09-06 15:40:46 +08:00
Angus Gratton b355854d4d Merge branch 'master' into feature/cmake 2018-09-05 10:35:04 +08:00
Ivan Grokhotkov 97b2281c49 Merge branch 'bugfix/can_driver_multiple_bugs' into 'master'
CAN: Add pm_lock, fix gpio bug, update docs

See merge request idf/esp-idf!3138
2018-09-04 20:34:06 +08:00
Darian Leung dc3fa14a26 CAN: Add pm_lock, fix gpio bug, update docs
This commit does the following

- Add power management lock to CAN driver so that APB frequency does not change
whilst CAN driver is in use
- Fix incorrect flag in can_transmit()
- Refactor can_driver_install() and can_driver_uninstall() so that critical sections
are shorter
- Fix CAN gpio configuration bug on RX pin. Closes #2302
- Add docs about multiple ID configuration and fix example links
2018-09-01 02:46:05 +08: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