Commit graph

119 commits

Author SHA1 Message Date
Ivan Grokhotkov 159a2d01d1 Merge branch 'bugfix/spi_dma' into 'master'
bugfix(spi_master): fix several issues when using RX DMA

See merge request !1006
2017-08-16 18:55:25 +08:00
michael ed1d084aea fix(spi_master): make the address field more intuitive to use.
The address field should be placed at the highest bits of address and slv_wr_status registers. Instead of breaking the address into two parts and fill in each register, move the address to the highest bits and write to the registers respectively.

Breaking change: if you fill-in the SPI address filed in a previous version in some way and it works correctly, you still have to rewrite the address, in a more intuitive way.
2017-08-15 14:49:31 +08:00
michael 227b011f6a fix(spi_master): fix SPI master, now able to transfer more than 32 bytes in non-DMA-accessable area.
apply for internal space to hold these data.
use DMA when it's enabled, no matter long or short.

TW#12226, github#551
2017-08-14 17:19:57 +08:00
Ivan Grokhotkov b260f6cb25 Merge branch 'bugfix/sdmmc_unaligned_write' into 'master'
sdmmc: fix reads/writes to/from unaligned buffers

See merge request !1071
2017-08-08 02:55:13 +08:00
Ivan Grokhotkov dfda0fa67b Merge branch 'feature/add_gpio_drive_capability' into 'master'
feature(gpio): add APIs to set and get pad drive capability.

See merge request !1010
2017-08-07 17:21:42 +08:00
Ivan Grokhotkov 512898edee sdmmc: fix reads/writes to/from unaligned buffers
SDMMC hardware treats all buffers as aligned, and ignores 2 LSBs of
addresses written into DMA descriptors. Previously SDMMC host driver
assumed that data buffers passed from SDDMC command layer would be
aligned. However alignment checks were never implemented in the command
layer, as were the checks that the buffer coming from the application
would be in DMA capable memory. Most of the time this was indeed true.
However in some cases FATFS library can pass buffers offset by 2 bytes
from word boundary. “DMA capable” restriction may be broken if pSRAM
support is used.

This change adds buffer checks to the SDMMC host driver (alignment and
DMA capability), so that the host layer will error out for incompatible
buffers. In SDMMC command layer, a check is added to read and write
functions. If an incompatible buffer is passed from the application, new
buffer (512 bytes size) is allocated, and the transfer is performed
using {READ,WRITE}_SINGLE_BLOCK commands.
2017-08-01 03:15:11 +08:00
Dmitry Yakovlev e5bb45f381 driver: SD protocol driver for SPI peripheral 2017-07-20 13:43:07 +08:00
Ivan Grokhotkov 5f8785eaec sdmmc: add support for SPI protocol commands 2017-07-20 13:34:21 +08:00
Ivan Grokhotkov 3b96771feb sdmmc: fix probing clock frequency
Probing clock frequency should be 400kHz, not 4MHz.
2017-07-20 13:34:21 +08:00
Ivan Grokhotkov 54dc350907 spi_master: fix duplicate bit mask for SPI_TRANS_MODE_DIOQIO_ADDR 2017-07-20 13:34:21 +08:00
Wangjialin c30149e4bd feature(gpio): add APIs to set and get pad drive capability. RTC pads use RTC registers to contol drive capability. 2017-07-19 11:23:41 +08:00
Ivan Grokhotkov cbe23147bf driver/rtc: add support for attaching handlers to RTC_CNTL interrupts 2017-07-10 17:21:49 +08:00
Wangjialin 40fd9db55d bugfix(uart): fix bugs reported from github
1. uart_set_line_inverse API issue, https://github.com/espressif/esp-idf/issues/673
2. tx buffer length issue, https://github.com/espressif/esp-idf/issues/710
2017-06-27 16:41:59 +08:00
krzychb 05f56d1d25 [TW#13322] Typo in documentation, fixes #694 2017-06-19 22:42:22 +02:00
krzychb 30edcca1fb docs: Generate Doxygen directives for API documentation
This is to resolve issue reported in https://github.com/espressif/esp-idf/issues/130.
2017-05-19 18:26:02 +02:00
zelll 0b447db8d8 uart driver: Move UART_EVENT_MAX to last
Merges https://github.com/espressif/esp-idf/pull/594
2017-05-17 11:36:13 +10:00
Konstantin Fedorov 31de20a217 docs: Error in gpio_install_isr_service() description
Merges https://github.com/espressif/esp-idf/pull/564
2017-05-17 11:04:17 +10:00
Ivan Grokhotkov 98e15df7f6 examples: add ULP ADC example 2017-05-16 13:15:02 +08:00
Jiang Jiang Jian a6608648db Merge branch 'driver_merge_tmp/mcpwm' into 'master'
feature: Motor Control PWM(mcpwm) driver and examples



See merge request !698
2017-05-12 18:21:38 +08:00
Wangjialin 1f055d28b8 Driver update: I2S pdm and built-in DAC
1. Modify I2S DAC built-in mode settings
2. Add I2S pdm mode
3. Correct I2S signal index in full-duplex mode
4. Modify dac output function
5. Add dac pad init functions
6. Modify DAC documentation
7. Add i2s_set_dac_mode API
2017-05-12 16:21:02 +08:00
Kewal M Shah 2008f4d88c feature: add Motor Control PWM(mcpwm) driver
1. Name change from chopper to carrier, block diagram update, minor changes to example codes
2. mcpwm_reg.h changed, brought uniformity in comments, worked on suggestions, duty to accept float. Some name changes!
3. Minor readme changes and Indetation
4. Minor change:  move mcpwm_reg.h and mcpwm_struct.h to new path
5. Minor change: addition of BLDC example code and Readme
6. Name changed from epwm to mcpwm
7. Improve the reg name in mcpwm_struct.h
8. Name change chopper>carrier, deadband>deadtime
2017-05-12 15:47:59 +08:00
Jeroen Domburg 8af3fe4e84 Warn against and check for non-DMA-capable pointers being passed to SPI when DMA is used 2017-05-05 12:28:03 +08:00
Angus Gratton 7db85a386a Merge branch 'bugfix/i2s_driver' into 'master'
I2S driver - fixed support for 24 and 32-bits, fixed tx/rx at the same time

- Modify sample can test with 24, 32-bits audio
- Add i2s sample README
- simply i2s_push function
- change sample rates, bits per sample, channel on fly

See merge request !483
2017-04-28 08:00:07 +08:00
krzychb 1a19747678 Getting started guides 2017-04-27 19:51:42 +02:00
Jeroen Domburg 04b901e629 SPI: More MR issues fixed, style fixup 2017-04-27 11:49:04 +08:00
Jeroen Domburg cecb846450 SPI: Fix comment for 3wire, make GPIO pins GPIO_MODE_INPUT_OUTOUT. Fixes https://github.com/espressif/esp-idf/issues/533 2017-04-27 11:49:04 +08:00
Jeroen Domburg 4c06dca15c SPI: Small fixes according to MR comments 2017-04-27 11:49:04 +08:00
Jeroen Domburg e9c372bc2d SPI: Split common SPI stuff out of master driver; add slave driver; add workaround for DMA issue. 2017-04-27 11:49:04 +08:00
Tuan PM fc1ee2666a I2S: fixed support for 24 and 32-bits, fixed tx/rx at the same time and others in log:
Add support 24, 32 bits

@jxmao optimize i2s_zero_buffer

@jxmao correct config support slave mode

@jxmao correct setup pin support tx/rx at the same time

Enhance pin power

@jxmao add dynamic change number of channels

remove nvs_init

remove start log and enhance power pin setup

using enum for i2s_channel and i2s_bits_per_sample, return ESP_ERR_INVALID_ARG when check params

validate i2s_bits_per_sample and channel

check tx & rx buffer before fill zero

remove checking channel as @jxmao suggest

limit dma buffer

modify i2s pin back to gpio mux before configure gpio matrix, resolve github issue #512

Add support 24, 32 bits

reduce push function

Modify sample can test with 24, 32-bits

Add i2s sample README

Fixed i2s_set_clk got reset sometime

can changes bit-wide while running

Fix sample rate calculation for DAC mode from @jeroen

modify example can change bits per sample every 5 seconds

cleanup

add comment for bytes_per_sample

update as @angus suggestions

Add i2s_set_clk api

I2S driver bug fixed as following log:

@jxmao optimize i2s_zero_buffer

@jxmao correct config support slave mode

@jxmao correct setup pin support tx/rx at the same time

Enhance pin power

@jxmao add dynamic change number of channels

remove nvs_init

remove start log and enhance power pin setup

using enum for i2s_channel and i2s_bits_per_sample, return ESP_ERR_INVALID_ARG when check params

validate i2s_bits_per_sample and channel

check tx & rx buffer before fill zero

remove checking channel as @jxmao suggest

limit dma buffer

modify i2s pin back to gpio mux before configure gpio matrix, resolve github issue #512

limit dma buffer to 4092

change gpio_matrix_*_check to inline function, remove some comments and rename test_i2s function to setup_triangle_sine_waves

for change commit title
2017-04-27 10:00:10 +07:00
Angus Gratton 94a61389ff Merge branch 'bugfix/driver_const_params' into 'master'
components/driver: 'const' all config calls.

Merges PR #519 https://github.com/espressif/esp-idf/pull/519

See merge request !687
2017-04-21 12:25:15 +08:00
Michel Pollet 349a77cb55 components/driver: 'const' all config calls.
Some were, some weren't. They all could/should be.

Signed-off-by: Michel Pollet <buserror@gmail.com>
2017-04-13 18:33:33 +01:00
devsaurus ae94fe04ef components/driver/rmt: Add const qualifier for config and tx data. 2017-04-11 18:55:56 +08:00
Jeroen Domburg 76295c7a13 Fix timing adjustment needed for higher speeds of SPI master bus. 2017-03-28 11:31:59 +08:00
Ivan Grokhotkov 6ad0a157e3 driver/rtc: add APIs to enable/disable hold function 2017-03-24 10:11:13 +08:00
Angus Gratton b9a06e68dd Merge branch 'bugfix/minor_fixes' into 'master'
Minor fixes and PRs cherry-picked from Github



See merge request !602
2017-03-23 17:57:28 +08:00
Angus Gratton c30bba8c63 rmt driver: Fix parameter & description of rmt_driver_install
Closes #187 https://github.com/espressif/esp-idf/issues/187
2017-03-22 12:30:34 +08:00
Ivan Grokhotkov 9254d2846f Merge branch 'feature/ledc_low_speed_channels' into 'master'
add ledc low speed channels

1. add low speed channels
2. modify example code.

See merge request !490
2017-03-21 15:35:40 +08:00
Wangjialin 7670e93639 Feature: add ledc low speed channels
1. Add low speed channels for LEDC module.
2. Improve fade object allocate mechanism.
3. Improve ledc example, add 2 low speed channels in example.
4. Remove debug code
5. Improve the register bit field name of slow clock.
2017-03-17 17:26:30 +08:00
Chu Shu Chen 194d4e9ffd fix(touch_pad): modify touch pad read function and touch_pad_deinit
The touch pad read function taks too much time within spin lock waiting for the "done bit". (about 7.6ms as we tested)
So we try to use a mutex on the touch read function and any other functions might change the "done bit".
2017-03-11 11:42:44 +08:00
Angus Gratton e7aea584f5 Merge branch 'bugfix/free_iram' into 'master'
uart driver: Remove ISR from IRAM



See merge request !486
2017-03-03 14:08:10 +08:00
Angus Gratton 3db4402f3c uart driver: Remove UART ISR handler from IRAM
Doesn't change example behaviour, as ISR wasn't being registered as
ESP_INTR_FLAG_IRAM.
2017-03-03 16:17:55 +11:00
Angus Gratton 6ee5a1e492 sdmmc: Use slot width as default slot_config width parameter, instead of 4
Ref #361 https://github.com/espressif/esp-idf/pull/361
2017-03-03 14:59:15 +11:00
Daniel Campora c08a2871e6 sdmmc: Add width field to the slot config.
Therefore if the width is set to 1, you can choose to only
configure the CLK, DAT0 and CMD pins.

Merges #361 https://github.com/espressif/esp-idf/pull/361
2017-03-03 14:59:15 +11:00
Angus Gratton 4db4e28b6e uart driver docs: Remove references to setting interrupt number
Closes #185 https://github.com/espressif/esp-idf/issues/185
2017-02-20 10:39:29 +11:00
Angus Gratton bfdfcbfaef docs: Add missing peripheral driver docs (ADC, DAC, RTC I/O, I2S) 2017-02-20 10:39:29 +11:00
Angus Gratton 21964a42fb rtc_gpio: Replace RTC_GPIO_IS_VALID_GPIO macro with inline function 2017-02-20 10:39:29 +11:00
devsaurus d8fb30c930 i2c: fix i2c_get_period name
rename i2s_get_period to i2c_get_period
2017-01-16 02:37:10 +08:00
Jeroen Domburg ee59fa75f4 Rename SPI Master IO pins to more common terminology, add better explanation to queue_length initialization value 2017-01-11 11:25:56 +08:00
Jeroen Domburg 5eb8eb3855 SPI master: rename transaction flags from SPI_* to SPI_TRANS_*, like the documentation says. Also add some explanation about the SPI signals in the documentation 2017-01-10 14:41:12 +08:00
Ivan Grokhotkov edd924f273 sdmmc: add peripheral driver and protocol layer 2017-01-09 04:51:24 +08:00