Skip to content
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

Unable to read SPI data from slave #68

Closed
silentjet opened this issue Jul 15, 2023 · 5 comments
Closed

Unable to read SPI data from slave #68

silentjet opened this issue Jul 15, 2023 · 5 comments
Assignees
Labels
ArduinoCore-samd Label for ArduinoCore-samd Stale UAY Unassigned yet

Comments

@silentjet
Copy link

silentjet commented Jul 15, 2023

Hi,
I'm trying to read the software version from peripheral device as a sanity check upon software startup and faced with very strange issue. I wrote a bare-bone code to check that, and it still has the same issue.

I'm sending a command 0x70 and I expect two bytes of response. Using a logic analyzer I can clearly see the response arrives and values are meaningful. But at the same time what is returned by SPI.transfer() it is zero instead of visible on analyzer values. I look through the library code and found out something like that
https://github.com/Seeed-Studio/ArduinoCore-samd/blob/v1.8.4/cores/arduino/SERCOM.cpp#L362

uint8_t SERCOM::transferDataSPI(uint8_t data)
{
  sercom->SPI.DATA.bit.DATA = data; // Writing data into Data register

  while(sercom->SPI.INTFLAG.bit.RXC == 0); // Waiting Complete Reception

  return sercom->SPI.DATA.bit.DATA;  // Reading data
}

I do not have too much knowledge about that, but I assume it shall work properly. But in reality it doesn't.

Hardware: Seeeduino XAIO SAMD21
Framework version: 1.8.4 installed via Arduino-IDE (GNU/Linux amd64)

image

@MatthewJeffson MatthewJeffson added UAY Unassigned yet ArduinoCore-samd Label for ArduinoCore-samd labels Oct 9, 2024
@Lesords Lesords self-assigned this Oct 14, 2024
@Lesords
Copy link

Lesords commented Oct 16, 2024

Hello,

I'm very sorry to have kept you waiting so long.

Do you still have this problem now?

@silentjet
Copy link
Author

silentjet commented Oct 17, 2024

Hello,
Sorry, can't say, cause I switched to another board (riscv based xaio).
I hope visible code can help you.

@Lesords Lesords moved this from Todo to In Progress in Issues and PR Assemble Nov 7, 2024
Copy link

github-actions bot commented Jan 8, 2025

This issue is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added Stale and removed Stale labels Jan 8, 2025
Copy link

This issue is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Jan 22, 2025
Copy link

This issue was closed because it has been stalled for 7 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 30, 2025
@github-project-automation github-project-automation bot moved this from In Progress to Done in Issues and PR Assemble Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ArduinoCore-samd Label for ArduinoCore-samd Stale UAY Unassigned yet
Projects
Status: Done
Development

No branches or pull requests

3 participants