-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with spi_master driver and two mixed-duplex devices (IDFGH-2555) #4641
Labels
Comments
github-actions
bot
changed the title
Problem with spi_master driver and two mixed-duplex devices
Problem with spi_master driver and two mixed-duplex devices (IDFGH-2555)
Jan 17, 2020
I found solution. file: spi_master.c
in spi_setup_device
file: spi_ll.h
Important!! |
I think, that problem is in 3.3.2
|
Anyone repair this error? |
The problem still exists in v4.0 :-( |
Wielebny666
referenced
this issue
May 22, 2021
…to 'release/v4.0' spi_master: correctly set cs polarity (4.0) See merge request espressif/esp-idf!10403
related to: #5490 |
espressif-bot
added
Status: Opened
Issue is new
Resolution: Done
Issue is done internally
Status: Done
Issue is done internally
and removed
Status: Opened
Issue is new
labels
May 25, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Environment
Problem Description
When using the spi_master driver with two devices on the same bus - one half-duplex and one full-duplex - the driver seems to drive the SPI device for longer than expected: When sending a first transaction to the half-duplex device and then sending a second transaction to the full-duplex device, the driver holds SCK low for longer than expected on the second transaction: It seems like it treats the second transaction as half-duplex, even though the device is configured as full-duplex.
To reproduce the issue, no actual SPI device has to be connected to the bus, since it is reproducible without any external device interaction.
I reported this before on the forums, but got no response.
Expected Behavior
The second transaction should be treated as a proper full-duplex one. In the code below, the second transaction should only last for a length of three bytes: one address byte and two data bytes (t.length = 16).
Actual Behavior
The second transaction looks like a half-duplex one. In the code below, it lasts for 5 bytes: One address byte, two bytes of proper data, and (presumably) the extra two bytes for the response (t.rxlength = 16).
The following shows the two transactions on the bus from the example code below on a logic analyzer:
Steps to reproduce
Code to reproduce this issue
Minimal example here
Debug Logs
No further logs are generated. In particular, there are no errors or warnings about the SPI transactions.
The text was updated successfully, but these errors were encountered: