Commit graph

364 commits

Author SHA1 Message Date
kooho 305c788c60 driver(uart): Add API to get the position of cmd_char 2018-04-03 12:34:16 +08:00
Ivan Grokhotkov 4a2489b99a sdspi: fix compatibility issue in multi block read
SDSPI driver optimized polling of the response tokens by requesting
two extra bytes on top of the block size (512) and CRC (2), and
checking whether these bytes contained the data response token or
not. In case the token was there, further polling would not need to
happen, thereby reducing latency between two consecutive blocks
transferred. However this caused compatibility issues when these two
extra bytes were sent after reading the final block. When
STOP_TRANSMISSION command was sent, these extra two bytes were
treated as part of the command, causing an invalid command error.

This fixes the logic by only requesting extra two bytes if the block
being read is not the final block. In addition to that, more strict
error checking is implemented for command response tokens.
2018-03-30 18:49:42 +08:00
Ivan Grokhotkov 229f67b816 sdspi: handle delayed R1 responses for data read commands 2018-03-30 18:49:42 +08:00
Ivan Grokhotkov bbbdec24d9 sdspi: handle error flags for R3/R7 responses
Previously error flags were only handled for R1 responses. This change
moves error handling into a separate function and calls it for R1/R3/R7.
2018-03-30 18:49:42 +08:00
Jiang Jiang Jian 8b9f237cb9 Merge branch 'feature/i2s_add_expand_function' into 'master'
add a new i2s feature to expand the original i2s width

See merge request idf/esp-idf!1617
2018-03-30 14:51:23 +08:00
Ivan Grokhotkov 1a157279e0 Merge branch 'doc/adc1_channel_config' into 'master'
adc: Add doc details about configure not needed before each read

See merge request idf/esp-idf!2132
2018-03-28 19:11:44 +08:00
Angus Gratton 4507b3fde6 adc: Add doc details about configure not needed before each read 2018-03-28 11:52:41 +11:00
Ivan Grokhotkov 2935e958fc Merge branch 'bugfix/adc2_cct' into 'master'
fix(adc2): fix cct and xpd configurations to improve precision of ADCs

See merge request idf/esp-idf!2020
2018-03-27 16:23:43 +08:00
Ivan Grokhotkov 892f3907fa Merge branch 'bugfix/i2c_ack_error_bug' into 'master'
driver(i2c):  Fixed i2c interrupt wdt timeout bug

See merge request idf/esp-idf!2049
2018-03-27 12:29:23 +08:00
Michael (Xiao Xufeng) 7563510758 feat(spi_master): allow output high speed data when dummy bits are not used. 2018-03-26 21:24:32 +08:00
michael 28e832c37e fix(adc2): fix cct and xpd configurations to improve precision of ADCs 2018-03-26 12:02:26 +00:00
kooho 37db055cff driver(i2c): Fixed ack_err interrupt can't exit bug. 2018-03-26 16:31:17 +08:00
Zhang Zhao Xiang f48ecb8613 Add a new i2s feature to expand the original i2s width 2018-03-22 18:52:55 +08:00
Ivan Grokhotkov 7e2028d598 Merge branch 'bugfix/gpio_timer_doc_fixes' into 'master'
Minor fixes of GPIO and timer group driver docs

See merge request idf/esp-idf!2081
2018-03-20 10:49:36 +08:00
Ivan Grokhotkov b9a8912659 Merge branch 'bugfix/spi_master_const_dev_config_t' into 'master'
spi master: use constant dev_config parameter in spi_bus_add_device

See merge request idf/esp-idf!2082
2018-03-19 16:31:19 +08:00
Jonathan Kaufmann a99d4d5a7f Modified spi_bus_add_device so that it takes a constant *dev_config parameter.
Merges https://github.com/espressif/esp-idf/pull/1690
2018-03-19 12:17:45 +08:00
Stefan Tauner 38daa1e716 docs: fix description of timer_get_alarm_value()
Replace c&p text with an actual description.

Merges https://github.com/espressif/esp-idf/pull/1740
2018-03-19 11:56:57 +08:00
Stefan Tauner 86a1d579ff docs: add warning to gpio_get_level()
On most microcontrollers I have worked with one can retrieve the
current state of output GPIO pins. On ESP32 this is not the case
if the pad is not explictly configured to route this information into
the port by configuring it as input or i/o.
Thus add a warning to the API documentation of gpio_get_level().

Merges https://github.com/espressif/esp-idf/pull/1740
2018-03-19 11:56:57 +08:00
Michael (Xiao Xufeng) 15be0829fa test(spi_master): test spi master speed performance by median value.
also increase the boundary of SPI limit by a little.
2018-03-16 16:37:19 +08:00
Ivan Grokhotkov c8ba6cf156 Merge branch 'feature/rtc_gpio_isolate' into 'master'
Add rtc_gpio_isolate function, use it in deep sleep examples

See merge request idf/esp-idf!1936
2018-02-26 06:09:08 +08:00
Angus Gratton 63ddae5087 Merge branch 'bugfix/i2s_driver' into 'master'
i2s: add support fixed_mclk configuration

See merge request idf/esp-idf!1600
2018-02-22 12:03:26 +08:00
Tuan PM 7cda34c626 i2s: add support fixed_mclk configuration 2018-02-22 09:00:23 +07:00
h3ndrik dcc466a673 i2s: fix type mismatch of intr_alloc_flags
Merges https://github.com/espressif/esp-idf/pull/1589
2018-02-16 16:20:12 +11:00
Ivan Grokhotkov 363c096f2b Merge branch 'test/adc2_with_wifi_reopen' into 'master'
test(adc2): re-enable the adc2 test.

See merge request idf/esp-idf!1926
2018-02-11 22:32:18 +08:00
Ivan Grokhotkov f45622ff17 driver/rtc: add rtc_gpio_isolate helper function to disconnect RTC IO 2018-02-11 13:18:51 +08:00
Ivan Grokhotkov e381c6adde Merge branch 'bugfix/fix_i2s_adc_mode' into 'master'
driver(i2s): fix broken i2s adc mode

See merge request idf/esp-idf!1653
2018-02-11 12:58:58 +08:00
Ivan Grokhotkov 62f924544d Merge branch 'test/spi_performance' into 'master'
test(spi_master): add performance display for spi master.

See merge request idf/esp-idf!1923
2018-02-08 22:59:40 +08:00
michael 687d6aa2cd test(adc2): re-enable the adc2 test. 2018-02-08 13:48:25 +08:00
Jeroen Domburg 35de8d703e Merge branch 'bugfix/spi_gpio0' into 'master'
fix(spi): several fixes about maros (flags) and GPIO0.

See merge request idf/esp-idf!1666
2018-02-07 18:50:13 +08:00
Michael (Xiao Xufeng) a151767426 test(spi_master): add performance display for spi master. 2018-02-07 17:50:13 +08:00
Wangjialin 451f69cc2e 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
2018-02-07 17:17:20 +08:00
Michael (XIAO Xufeng) e14e1508cb fix(sdmmc_host): fix the issue when slot and host flag are not compatible. 2018-02-07 12:05:05 +08:00
Michael (XIAO Xufeng) 8abbb17401 feat(sdmmc_host): force pull-up DAT3 for SD 4-bit mode so that slave will not fall into SPI mode. 2018-02-07 12:05:05 +08:00
Michael (Xiao Xufeng) 5214a0600c test(adc2): temporary ignore adc2 unit test (with WiFi) to pass the CI.
the issue is introduced in commit 17f01eb718.
2018-02-06 11:59:40 +08:00
Angus Gratton 4297c337f9 esp32: Add IO_MUX_GPIOxx register names to match iomux names used in TRM
The TRM describes IOMUX registers are IO_MUX_x_REG for x in GPIO0-39.

Until now ESP-IDF describes them as PERIPHS_IO_MUX_(pinname)_U

This commit adds additional IOMUX register names which match the ones used in the TRM.
2018-01-30 17:09:37 +08:00
michael be96e1db95 fix(spi): fix typo of LSBFIRST macro.
Closes https://github.com/espressif/esp-idf/issues/1480, Closes https://github.com/espressif/esp-idf/issues/1464
2018-01-29 17:44:37 +08:00
michael 8900200147 fix(spi_master): fix the variable command and address flag issue.
Closes https://github.com/espressif/esp-idf/issues/1549
2018-01-29 17:44:36 +08:00
michael 60469c500a fix(spi): fix pin issue with GPIO0 (other pins than CS). 2018-01-29 17:44:36 +08:00
Wangjialin 870efdb9d4 bugfix(uart): patten detect function
requirement from github(https://github.com/espressif/esp-idf/issues/805): to provide the position in the buffer of the pattern detected.

requirement from AT application: in AT app, when no hardware flow control is enabled, in some situation the rx buffer might be full, and the terminator “+++” might be lost, we can use pattern detect interrupt to avoid missing the terminator. When pattern detect interrupt happens, it will not send a data event at the same time.

1. Add API to get position of detected pattern in rx buffer
2. Modify UART event example
3. Add comments for uart_flush, add alias API uart_flush_input to clear the rx buffer
4. Modify the way rx_buffered_len is calculated
2018-01-22 13:33:51 +08:00
kooho 492db0591d Fix uart fifo overflow bug 2018-01-12 14:42:54 +08:00
Angus Gratton 2227c44254 rmt: Add void * argument for end-of-transmission callback
Ref https://github.com/espressif/esp-idf/pull/1174
2018-01-05 17:31:59 +11:00
Krzysztof Bociurko 1066c74b74 rmt: Adds a simple handler that can be called when transmission ends.
Merges https://github.com/espressif/esp-idf/pull/1174
2018-01-05 17:14:02 +11:00
Ivan Grokhotkov 30aacb79d5 Merge branch 'bugfix/uart_semaphore_pr1387' into 'master'
uart driver: Remove unnecessary xSemaphoreGive()

See merge request !1739
2018-01-05 11:05:05 +08:00
Angus Gratton 6e23ee704b Merge branch 'refactor/spi_clk_pre_cal' into 'master'
bugfix(spi_master): improve spi time cost for each transfer.

See merge request !1670
2018-01-04 06:03:12 +08:00
Alexey Morozov 25b8642835 uart driver: Remove unnecessary xSemaphoreGive()
avoid unnecessary call of xSemaphoreGive(p_uart_obj[uart_num]->tx_mux);

Merges https://github.com/espressif/esp-idf/pull/1387
2018-01-03 13:44:19 +11:00
Per Malmberg f7f52414ec Removed logging in RMT driver which skews the timing. Issue #1345
Merges https://github.com/espressif/esp-idf/pull/1450
2018-01-03 10:50:03 +11:00
Per Malmberg 5fb16d9b2b Fix regression in i2c_master_read() which rejected all data lenths. 2017-12-28 14:54:15 +01:00
michael 2552fdccd1 chore(spi): add log to show native pins or not when configure pins. 2017-12-28 12:03:29 +08:00
michael f4be6ac84d fix(spi_master): fix the logic in the ISR to prevent re-config registers when device is not changed. 2017-12-28 12:03:29 +08:00
michael 7a7b8fc182 refactor(spi_master): move the clock calculation from ISR to initialization. 2017-12-28 12:03:28 +08:00