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

SD card returning error #18

Open
charlespax opened this issue Aug 22, 2016 · 2 comments
Open

SD card returning error #18

charlespax opened this issue Aug 22, 2016 · 2 comments
Assignees
Milestone

Comments

@charlespax
Copy link
Member

charlespax commented Aug 22, 2016

We're able to read/write to SD cards, but there are some problems.

  • High clock speeds does not work always
  • Some cards never work

The 256 MB cards that ship with the T400 have worked flawlessly in the T400. However, they do not work at all in the labWiz. The T400 operates the SD card in SPI mode while LabWiz uses 1-bit SD mode. There could be something happening with the initialization. A doc online states, "To switch the card to SPI mode, the CS signal must be asserted while the host issues a reset command to the card. " The SPI mode CS pin is not connected, so it is floating. Maybe we need to add a pullup/pulldown resistor to made sure the CS pin is not being asserted. Is a RESET command currently being sent to the SD card on startup?
screen shot 2017-01-31 at 17 32 35

@charlespax
Copy link
Member Author

charlespax commented Aug 22, 2016

Note that the pin connections for SPI mode and 1-bit SD mode are different.
screen shot 2016-08-22 at 19 45 09

See also PaxInstruments/labwiz-board#24

@protological
Copy link
Collaborator

A deep dive should be done in the SD card "HAL" provided by ST. There is a drv_filesystem source file that should wrap all the functions of the SD card, so the developer just needs to call open() write(), close(), etc. Also check around line 340 of labwiz_entry.c for a note on the SD card init. The init function checks for the presence of an SD card.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants