Commit Graph

23 Commits

Author SHA1 Message Date
wanlei
51ffd40843 feat(spi_master): rebase dma sct mode support, rename APIs, use malloc conf_buffer 2024-03-20 16:06:43 +08:00
wanlei
1e6c61daa6 spi_master: sct mode support set line mode, transaction interval time
support line mode 1-2-4-8 depend on targets.
fix sct mode dma descriptor counter compute issue.
add conf_bits_len setting API to control interval time.
2024-03-20 15:42:03 +08:00
Armando
b303e4b7a6 spi_master: new segmented-configure-transfer mode 2024-03-20 15:42:03 +08:00
wanlei
2baee4fb0f refactor(spi_master): replace dma_ll in spi hal layer (part 2.1) 2023-12-28 19:58:54 +08:00
wanlei
00fcdce725 feat(spi_master): p4 add master driver supported 2023-10-08 14:45:12 +08:00
wanlei
8f5851d064 fix(all): unify default mosi level to low on all targets 2023-07-24 15:45:21 +08:00
morris
56a376c696 feat(esp_gdma): add hal interface for common operations
GDMA driver will be adapted to more DMA peripherals in the future.
This commit is to extract a minimal interface in the hal layer
2023-07-10 13:45:57 +08:00
wanlei
184145817c spi_master: add feature spi periph clk source selectable 2023-01-18 15:40:12 +08:00
Armando
6a74cb695d spi: support spi on 8684 2022-01-12 11:30:29 +08:00
bizhuangyang
8143832041 spi_master:support octal mode for esp32s2 and esp32s3
Add support for 8-line spi for lcd on esp32s2 and esp32s3

Closes https://github.com/espressif/esp-idf/issues/6371
2021-08-19 16:40:22 +08:00
Armando
fd6173b9b7 spi_master: correctly reset spi afifos before DMA transaction starts 2021-07-28 17:51:25 +08:00
Omar Chebib
a6e14c37b2 SPI: chip select can now be kept active if the bus has been acquired
The user can now request the chip select to remain active after the current
transfer. In order to do so, he MUST acquire the bus first with `spi_device_acquire_bus()`
function, else, an error is returned.
2021-07-21 10:39:45 +08:00
morris
9afdf54748 hal: added HAL_ASSERT 2021-06-22 11:28:01 +08:00
Armando
c438ad5d72 spi: apply gdma allocator to SPI 2021-02-22 07:06:05 +00:00
Armando
0c3653b1fd spi_master: fix master HD mode cannot correctly receive data issue when using DMA.
Issue Description:
If master is in HD mode, if it sends data without receiving data, it will
still enable the RX DMA because of old version ESP32 silicon issue. And
because there is no correctly linked RX DMA descriptor, an
``inlink_dscr_error`` intr will be seen, which will influence the
following RX transactions.

Solution:
Trigge this workaround only in FD mode.

TODO:
Add a test to check if this workaround related issue does exit. If so,
reporting to Digital Team is also needed.
2021-01-05 18:16:49 +08:00
Angus Gratton
7c08be5771 hal: Add initial ESP32-C3 support
From internal commit 7761d6e8
2020-11-30 15:23:15 +11:00
Angus Gratton
66fb5a29bb Whitespace: Automated whitespace fixes (large commit)
Apply the pre-commit hook whitespace fixes to all files in the repo.

(Line endings, blank lines at end of file, trailing whitespace)
2020-11-11 07:36:35 +00:00
Armando
f7e91ef6c1 spi: esp32s3 bringup for spi 2020-10-26 11:28:34 +08:00
Michael (XIAO Xufeng)
1966f00f0b soc: updates caps usage
We should define caps as 1 if true. When use the caps macros, #if and
 #if ! should be used instead of #ifdef/#ifndef.
2020-10-17 16:10:17 +08:00
Armando
1e1beb69aa spi: fix build fail issue when target is esp32s3 2020-09-24 10:51:23 +08:00
Armando
59e350b195 spi: seperate the pointer for the TX and RX DMA 2020-09-21 20:33:56 +08:00
Armando
27a6f2666a spi_master: refactor hal context structures
This commit seperates the hal context into different configuration
structures based on their members' definitions. Through refactoring
spi_master.c, the device related configuration should be passed in and
set each time before a new transaction. The transaction related
configuration now is a local variable in case of the fact that error
occurs without any notice when user forgets to pass new transaction
configuration in (which means the old driver will use the trans_config
that is saved from last transaction).

Besides, via above refactor, this commit fixs a bug which leads to
wrong cs polarity setting.
Closes https://github.com/espressif/esp-idf/pull/5490

Moreover, via above refactor, this commit also fixs a bug about duplex
mode switching when multiple devices are added to the bus.
Closes https://github.com/espressif/esp-idf/issues/4641
2020-09-21 20:32:41 +08:00
Michael (XIAO Xufeng)
5425ef4ee4 hal: extract hal component from soc component 2020-09-01 13:25:32 +08:00