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

nordic spim: does not work with SPI-SDHC infrastructure #28240

Closed
pabigot opened this issue Sep 9, 2020 · 2 comments · Fixed by #28359
Closed

nordic spim: does not work with SPI-SDHC infrastructure #28240

pabigot opened this issue Sep 9, 2020 · 2 comments · Fixed by #28359
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug platform: nRF Nordic nRFx

Comments

@pabigot
Copy link
Collaborator

pabigot commented Sep 9, 2020

As summarized in #27841 (comment) samples/subsys/fs/fat_fs/ does not run correctly when controlled by a SPI3 configured as nordic,nrf-spim. It appears that CSn is not being correctly deasserted at the end of transactions. this is true, but is probably a secondary effect of the sdhc disk access layer not being consistent about checking return codes

@pabigot pabigot added bug The issue is a bug, or the PR is fixing a bug platform: nRF Nordic nRFx labels Sep 9, 2020
@pabigot
Copy link
Collaborator Author

pabigot commented Sep 10, 2020

This is because SPIM can't transmit data from flash, so an initial transfer of 74 clocks to synchronize is never sent.

@pabigot
Copy link
Collaborator Author

pabigot commented Sep 10, 2020

Because SPI transfers from data buffers stored in flash fail, and because the disk_access_spi_sdhc layer doesn't check error codes, large numbers of critical SPI transfers are not being transmitted, so the driver never detects that the device is actually present and able to respond.

@pabigot pabigot changed the title nordic spim: does not work with FatFS example nordic spim: does not with SPI-SDHC infrastructure Sep 10, 2020
@pabigot pabigot changed the title nordic spim: does not with SPI-SDHC infrastructure nordic spim: does not work with SPI-SDHC infrastructure Sep 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug platform: nRF Nordic nRFx
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants