Skip to content

[bug] SPI Transfer not updating buffer values #121

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

Open
MattStep90 opened this issue Mar 14, 2025 · 1 comment
Open

[bug] SPI Transfer not updating buffer values #121

MattStep90 opened this issue Mar 14, 2025 · 1 comment
Assignees
Labels
bug Something isn't working fix in next release

Comments

@MattStep90
Copy link

Hardware

Arduino Nano Matter V0.3

Core version

2.2.0

Arduino IDE version

2.3.2

Operating system

Windows 10

Radio stack variant

Matter

OpenThread Border Router device (if using Matter)

No response

Issue description

The SPI.transfer(buffer, size) function does not update the buffer with values returned from the SPI bus as is expected in the standardized Arduino SPI library. This breaks compatibility with many other libraries where the SPI.transfer function is used and expects that the buffer provided will be updated with return values.

Serial output

No response

RTT output (if using Matter)

No response

Minimal reproducer code

No response

@MattStep90 MattStep90 added the bug Something isn't working label Mar 14, 2025
@silabs-bozont silabs-bozont self-assigned this Apr 9, 2025
@silabs-bozont
Copy link
Collaborator

silabs-bozont commented Apr 9, 2025

Hello @MattStep90,
Thank you for the bug report! According to the docs you're right - SPI.transfer(buffer, size) should update the original buffer with the received values. I'm working on a fix and it'll be included in the next release!
In the meantime you can use this function to send and receive multiple bytes in a single call. It works similarly, the only difference is that you also have to provide a separate receive buffer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fix in next release
Projects
None yet
Development

No branches or pull requests

2 participants