Commit graph

336 commits

Author SHA1 Message Date
Michael (XIAO Xufeng)
e238cf85a2 spi: fix a possible concurrency issue 2019-06-11 14:22:25 +08:00
Jiang Jiang Jian
e04cb97187 Merge branch 'bugfix/i2c_hardware_filter_default_enable_v3.0' into 'release/v3.0'
driver(i2c): enable I2C master hardware filter by default (backport v3.0)

See merge request idf/esp-idf!3817
2019-01-25 13:54:49 +08:00
Jiang Jiang Jian
8fac11eb1f Merge branch 'test/add_case_to_detect_ds2ds_issue_v3.0' into 'release/v3.0'
test: add case to detect ds2ds issue (backport v3.0)

See merge request idf/esp-idf!3867
2018-12-29 10:34:25 +08:00
Angus Gratton
f3a108f629 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-12-28 15:53:01 +08:00
kooho
ca380caba9 driver(uart): fixed uart read error bug when using dual core for release/v3.0. 2018-11-28 17:59:27 +08:00
kooho
b39143b922 driver(i2c): enable I2C master hardware filter by default for release/v3.0 2018-11-28 17:50:32 +08:00
Konstantin Kondrashov
7761b0f28b 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-19 20:57:01 +08:00
michael
4ae01aed27 test: modify the command/address test a bit to test the LSBFIRST feature 2018-10-09 00:34:13 +08:00
michael
a5a692ef8c spi: move gpio direction config to common func for coinsistence
(MINOR CHANGE)
2018-10-08 19:04:38 +08:00
Michael (XIAO Xufeng)
3c532e4532 spi_master: fix the command and address field when LSB_FIRST enabled
Resolves https://github.com/espressif/esp-idf/issues/2444.
2018-10-08 19:04:37 +08:00
michael
a7ad8bc873 spi_slave: fix the issue rx dma get broken by master unexpected transaction 2018-09-18 00:49:25 +08:00
Michael (XIAO Xufeng)
cfed7c84ce spi: fix the issue that spi cannot be used when flash is disabled
The dma configuration function called in the ISR should be put into the IRAM.

Fixes https://github.com/espressif/esp-idf/issues/2307.
2018-08-24 11:07:18 +08:00
hou wen xiang
a7c9cf3a6b driver(uart): Fix uart time_out bug when using ref_tick for release v3.0 2018-07-18 17:35:59 +08:00
kooho
ef9dbff112 driver(uart):Fix the bug that uart buffer_full flag is true all the time. 2018-05-18 16:35:32 +08:00
Wangjialin
945d2e697c driver(i2s): fix broken i2s adc mode
1. Move i2s reset code from i2s_stop to i2s_start.
2. add RTC API to set sw mode for ADC
3. add description for adc_power_always_on()
4. add lock for i2s dma and RTC ADC functions.
5. add ADC read task in example

reported from bbs:  https://esp32.com/viewtopic.php?f=13&t=3490&p=17522#p17522
reported from github: https://github.com/espressif/esp-idf/issues/1333

Also update some deprecated APIs for ADC.
2018-05-16 11:42:53 +08:00
Zhang Zhao Xiang
7535dbc454 fix zero dma buffer bug: must be 4-bytes aligned 2018-04-23 19:33:11 +08:00
Zhang Zhao Xiang
aeb4d8e3c2 modify i2s param and comments 2018-04-23 14:30:55 +08:00
kooho
7a32ae363e driver(uart):Provide an API to get the position of the cmd char from queue without modify the queue. 2018-04-18 10:11:02 +08:00
Jiang Jiang Jian
fddc905fa3 Merge branch 'bugfix/tw19728_support_static_allocation_of_freertos_queue_used_by_isr' into 'release/v3.0'
esp32/driver/bt: support static allocation of FreeRTOS queues used by ISR routine

See merge request idf/esp-idf!2171
2018-04-12 23:07:51 +08:00
Zhang Zhao Xiang
bf4184a049 fix i2s mix result and error code 2018-04-10 12:04:05 +08:00
Liu Zhi Fu
212222a9e0 esp32/bt/driver: support static allocation of FreeRTOS queues used by ISR routine
Support static allocation of FreeRTOS queues used by ISR routine in WiFi/BT/esp_timer/driver etc
2018-04-09 13:39:31 +08:00
Zhang Zhao Xiang
fed3c3ebf0 Add a new i2s feature to expand the original i2s width 2018-04-02 05:24:38 +00:00
kooho
14baac302f driver(i2c):Fixed i2c bug for release/v3.0 2018-03-29 14:03:04 +08:00
kooho
3a6be05945 driver(uart):merge branch into v3.0 which fixed three bug related with uart
1. uart fifo reset
    2. uart pattern interrupt
    3. uart buffered_len error.
2018-01-24 21:27:31 +08:00
Per Malmberg
2cc07d0c4c Fix regression in i2c_master_read() which rejected all data lenths. 2018-01-02 10:01:23 +11:00
krzychb
9b57d4aa0d RMT API docs update, new example 2017-12-27 16:54:28 +08:00
kooho
48fda0f27b add NACK for the last byte to read 2017-12-27 16:54:27 +08:00
Chuck Todd
492b926d50 i2c: rx <-> tx typo's, NULLing free'd variable, consistent CRITICAL sects
A couple of typos referencing tx_ring_buf when rx_ring_buf, slv_tx_mux
instead of slv_rx_mux.

Also, I2C_ENTER_CRITICAL()/I2C_EXIT_CRITICAL() usage was not consistent.
Only some of the _set_ functions had them.  Most of the _get_ function
had them?  It is my understanding that they should be wrapped around
writes, not reads? (I think we still need the lock for reading pairs of consistent values)

Also, the ticks_to_wait timeout handling in i2c_master_cmd_begin() would
not handle integer rollover correctly.

Merges https://github.com/espressif/esp-idf/pull/1180
2017-12-27 16:54:24 +08:00
Fabiano Kovalski
b5f8cf0f03 driver(i2c): corrected timeout range for i2c_set_timeout.
Merges https://github.com/espressif/esp-idf/pull/1353
2017-12-27 16:54:24 +08:00
Wangjialin
c4bb528c61 bugfix(i2c): use queue instead of event group for internal commands
Reported from github:
https://github.com/espressif/esp-idf/issues/1312
https://github.com/espressif/esp-idf/issues/1193

Issues:
1. We used to use event group in the driver, which would cause:
    a. longer operation time since the event group are based on FreeRTOS timer.
    b. Operation fails if the timer queue is not long enough.
2. There might be some issue with event group, we will still try to provide a small test code in other branch.

modification:
1. use queue instead of event-bit for internal commands
2. use queue overwrite for cmd_done event
2017-12-27 16:54:23 +08:00
Ivan Grokhotkov
a0776b2f21 sdspi: use response timeout passed from upper layer
Previously SDSPI host driver would rely on retry count when waiting for
the card to read or write data. This caused different timeout times
depending on CPU frequency and card clock frequency. In practice, card
performance does not depend on these two factors.
This change uses timeout_ms field of sdmmc_command_t introduced
previously for SDMMC host.

Fixes https://esp32.com/viewtopic.php?f=2&t=3440&p=16037 and similar
issues related to SDSPI timeouts.
2017-12-27 16:54:21 +08:00
krzychb
eae3b45170 LEDC Driver: Added back original definitions of 'duty_resolution' and 'clock_divider'. This update is to provide backward compatibility with ESP-IDF 2.1. 2017-12-07 20:52:54 +08:00
Jiang Jiang Jian
c672fc54fd Merge branch 'feature/ledc_more_meaningful_parameter_names' into 'master'
Provided more meaningful parameter names by renaming 'bit_num' to 'duty_resoluti…

See merge request !1440
2017-12-01 19:33:53 +08:00
krzychb
866b84b9f8 Typo fix. Closes https://github.com/espressif/esp-idf/issue/1323 2017-12-01 09:06:08 +01:00
Angus Gratton
5e7478a055 Merge branch 'bugfix/ledc_fade_scale' into 'master'
driver(LEDC): add scale value check in ledc_set_fade API

See merge request !1583
2017-11-27 07:23:19 +08:00
panfeng
b553c925b1 bugfix: while scale equals 0 will cause crash 2017-11-23 17:56:18 +08:00
kooho
ada33fe3dd Add GPIO input and output disable option 2017-11-22 15:00:27 +08:00
Ivan Grokhotkov
4b8f55aadf Merge branch 'bugfix/minor_fixes_github' into 'master'
Minor fixes from github

See merge request !1555
2017-11-20 15:58:34 +08:00
Angus Gratton
f54e99008d spi: Add ESP_ERR_NO_MEM to spi_device_queue_trans() documentation
Ref https://github.com/espressif/esp-idf/pull/1243#issuecomment-343103414
2017-11-20 16:06:59 +11:00
michael
02573a8dc9 fix(spi_master): release temporary memory when queue new trans timeout. 2017-11-17 12:15:19 +08:00
michael
13d38f10ee test(spi): internal connection test master with slave for address and command field. 2017-11-17 12:15:19 +08:00
michael
57e1d47ad7 fix(spi_master): fix the CS pin issue with GPIO 0.
Closes #909
2017-11-17 12:15:19 +08:00
michael
842292523f fix(spi_slave): add interrupt free into bus free process. 2017-11-17 12:14:40 +08:00
Raphael Luba
31711b5ac7 SPI: Document TIMEOUT return values
`spi_device_queue_trans` and `spi_device_get_trans_result` can return `ESP_ERR_TIMEOUT` – but this had not been documented.

Merges https://github.com/espressif/esp-idf/pull/1243
2017-11-17 10:50:54 +11:00
krzychb
d488bb7bac Provided more meaningful parameter names by renaming 'bit_num' to 'duty_resolution' and 'div_num' to 'clock_divider' 2017-11-15 08:08:12 +01:00
Ivan Grokhotkov
da141a2c7e Merge branch 'bugfix/touch_pad_register_mismatch' into 'master'
Bugfix/touch pad register mismatch

See merge request !1469
2017-11-15 14:52:13 +08:00
Wangjialin
7200b2cc11 bugfix(touch): registers of touchpad 8 and 9 are mismatched
1. All the registers of touch sensor 8 and 9 are mismatched except the ‘dac’ field in touch register of RTC IO
2. To swap the index for sensor 8 and 9 in APIs.
2017-11-14 18:47:56 +08:00
Ivan Grokhotkov
09d2791cfd Merge branch 'feature/spi_variable_len' into 'master'
feat(spi_master): add new feature allow use variable command and address field length for the same device.

See merge request !1322
2017-11-14 00:08:50 +08:00
Ivan Grokhotkov
5404252e80 Merge branch 'bugfix/uart_fifo_bug_workaround' into 'master'
bugfix(uart): workaround for uart fifo reset issue

See merge request !1499
2017-11-13 17:46:42 +08:00
Wangjialin
4052803e16 bugfix(uart): workaround for uart fifo reset issue
Reported from github:
https://github.com/espressif/esp-idf/issues/1219
https://github.com/espressif/esp-idf/issues/1202

After providing a simple code to digital team, they confirmed that this is a hardware bug.

Root cause:
The fifo reset signal is incorrectly connected
If we want to reset tx fifo of UART2, we have to set txfifo_rst bit of both UART1 and UART2
If we want to reset rx fifo of UART2, we have to set rxfifo_rst bit of both UART1 and UART2

Workaround:
we don't use fifo rst bit in driver.

Documentation:
Digital team would update TRM and give more explanation about this issue.
2017-11-13 15:23:00 +08:00