Commit graph

192 commits

Author SHA1 Message Date
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
Jeroen Domburg 9314bf0d37 Merge branch 'bugfix/spi_change_host' into 'master'
fix(spi_master): fix the bug that VSPI no respond when host changed from HSPI to VSPI, and vice versa.

See merge request !997
2017-07-31 18:33:36 +08:00
Ivan Grokhotkov 002f38fa8f Merge branch 'feature/sdspi_driver' into 'master'
SD SPI mode driver

This MR adds functionality to support SD cards connected via SPI interface.
Additionally, two bugs are fixed:
- Definition of `SPI_TRANS_MODE_DIOQIO_ADDR` in spi_master driver
- SD card probing frequency was 4000kHz instead of 400kHz as required by the standard

See merge request !727
2017-07-26 13:51:37 +08:00
michael 99769f0b00 fix(spi_master): fix the bug that VSPI no respond when host changed
from HSPI to VSPI, and vice versa.

fix the SPI control bits written wrong in the headers.

TW#12123, Github#477
2017-07-21 14:50:17 +08:00
Wangjialin 9d466de235 bugfix(uart): fix signal glitch on tx pin
gpio_matrix_out function will set output enable for GPIO, seems in gpio_matrix_out there will be a short moment that the chip will output GPIO level.
So we can set GPIO as high before gpio_matrix_out function.
2017-07-20 14:34: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 7fc25f18d2 Merge branch 'feature/enable_brownout_detector' into 'master'
Enable brownout detector

See merge request !811
2017-07-13 11:40:37 +08:00
Angus Gratton 8d7074ed5c soc: Move esp_ptr_dma_capable() function to soc_memory_layout.h 2017-07-10 17:46:03 +08:00
Angus Gratton 71c70cb15c heap: Refactor heap regions/capabilities out of FreeRTOS
Remove tagged heap API, rename caps_xxx to heap_caps_xxx

Also includes additional heap_caps_xxx inspection functions.
2017-07-10 17:46:03 +08:00
Ivan Grokhotkov cbe23147bf driver/rtc: add support for attaching handlers to RTC_CNTL interrupts 2017-07-10 17:21:49 +08:00
Ivan Grokhotkov 1194f59e1a Merge branch 'bugfix/i2s_return_err_code' into 'master'
i2s driver: return error code if register isr error

See merge request !829
2017-07-06 11:25:40 +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
Angus Gratton 17747b3358 gpio driver: Clear GPIO matrix output config when setting pin as input
Otherwise, if a non-GPIO peripheral has been routed to this pin
(as an output), output driver can remain enabled.
2017-06-26 12:47:08 +10:00
James Sarrett b772024699 send bus initialization bits before MMC_GO_IDLE_STATE command to initialize card after poweron 2017-06-22 11:08:47 +08:00
krzychb 05f56d1d25 [TW#13322] Typo in documentation, fixes #694 2017-06-19 22:42:22 +02:00
Nilay 769944b067 PCNT: fix for pcnt_set_pin API, it can now use all pcnt channels 2017-06-16 11:18:00 +05:30
Nilay f50b5481fa PCNT: Fixed pcnt_counter_clear, Pulse Count now able to resume after API call 2017-06-16 11:11:52 +05:30
Jiang Jiang Jian aefde1517d Merge branch 'bugfix/i2c_delete_interrupt_race' into 'master'
i2c driver: When deleting, disable interrupts before freeing data structures

See merge request !836
2017-06-14 17:47:22 +08:00
Tuan PM f91715438a i2s: return error code if register isr error, resolve #587 (github)
set p_i2s_obj = NULL when return error
2017-06-13 14:28:47 +07:00
Angus Gratton c77b699463 rmt driver: Manage driver interrupt handler based on which channels are enabled
Previously the first call to rmt_driver_uninstall() would remove the interrupt handler,
even if other channels still had the driver installed.

Adds an OS-level lock to control concurrent registration/deregistration of channels.
2017-06-09 16:11:21 +10:00
Angus Gratton 4b58cc12cd rmt driver: When deleting, disable interrupt before freeing data structures
Fixes potential race if RMT interrupt happens while deregistering (unlikely
due to timing of taking semaphore tx_sem, but still possible.)
2017-06-08 16:14:51 +10:00
Angus Gratton a89e93fc3d i2c driver: When deleting, disable interrupts before freeing data structures
Fixes a potential race if I2C interrupt occurs while driver is being delted.
2017-06-08 15:57:31 +10:00
Angus Gratton 1cbdb35e1e Merge branch 'bugfix/i2s_channel_setting' into 'master'
bugfix(i2s): fix error when changing channel number in i2s_set_clk function

See merge request !784
2017-06-06 14:40:43 +08:00
jack fc130fba86 fix bug that files missing commit in MR 773 2017-05-31 19:37:39 +08:00
Wangjialin f68c5baea6 bugfix(i2s): fix error when changing changel number in i2s_set_clk function 2017-05-23 19:32:10 +08: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
Jiang Jiang Jian c518325385 Merge branch 'bugfix/dualcore_dport' into 'master'
component/esp32 : fix dualcore bug

1. When dual core cpu run access DPORT register, must do protection.
2. If access DPORT register, must use DPORT_REG_READ/DPORT_REG_WRITE and DPORT_XXX register operation macro.

See merge request !742
2017-05-10 11:27:01 +08:00
Tian Hao 26a3cb93c7 component/soc : move dport access header files to soc
1. move dport access header files to soc
2. reduce dport register write protection. Only protect read operation
2017-05-09 18:06:00 +08:00
Tian Hao f7e8856520 component/esp32 : fix dualcore bug
1. When dual core cpu run access DPORT register, must do protection.
2. If access DPORT register, must use DPORT_REG_READ/DPORT_REG_WRITE and DPORT_XXX register operation macro.
2017-05-08 21:53:43 +08:00
Jeroen Domburg 9962cc9c9f Fix out-of-bounds on dmaworkaround_channels_busy 2017-05-08 16:11:46 +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
devsaurus 530c3ca05c components/driver/spi_master: free dma descriptors
Signed-off-by: Jeroen Domburg <jeroen@espressif.com>
2017-05-05 11:13:42 +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 9134c13c73 Fix SPI master CI test 2017-04-27 14:50:02 +08:00
Jeroen Domburg 04b901e629 SPI: More MR issues fixed, style fixup 2017-04-27 11:49:04 +08:00
Jeroen Domburg bf0c32364a SPI: Also check SPI_TRANS_USE_[T|R]XDATA when decifding to turn on MOSI/MISO. Fixes https://github.com/espressif/esp-idf/issues/488 2017-04-27 11:49:04 +08:00
Jeroen Domburg 881a90b8ab SPI: SPI master clock calculation: n has a minimum of 2 to allow for both a low and a high cycle. Fixes https://github.com/espressif/esp-idf/issues/491 2017-04-27 11:49:04 +08:00