-
Notifications
You must be signed in to change notification settings - Fork 161
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
Need help stm32f411 two devices on SPI #167
Comments
Some addition - I power the stm32 from a stlink programmer, which produces 3.3 volts, which is of course not enough for the SD card module, and I know about it. The thing is that when I power the stm32 board and the SD card module from 5 volts, the code also behaves inadequately:
In case of 5 volt power supply and code as above, the output to the serial port is always OK.
Either the |
Strange things with a
I was surprised that this is an The second |
Hi @brightproject. Thanks for your interest in this open source project. This issue tracker is only to be used to report bugs or feature requests specific to the project. This topic is more appropriate for the Arduino Forum. I'm sure we will be able to help you out over there: |
I have
stm32f411ceu6
I connect two different devices to it via
SPI
:CAN bus transceiver
module with microSD
Two device boards are connected to one
SPI,
only differentSS
contacts.The connection is very simple, I use standard contacts for the SPI:
The
CAN
module works fine, checked in another code.Now I decided to launch in addition to the
CAN
module also a module for saving data to themicro SDHC
card.I have three
microSD
cards -512
MB,8
GB and32
GB.The cards are not of the best quality, the
512 MB
card stopped being detected after the first attempt to consider it a SD module, and it can't even be formatted via the program.Apparently the card has become unusable☹
However, I don't understand what is missing in the code or hardware for this to work, the code is:
The output of the serial port is as follows:
I tried to pull the
CS
pins of two devices to logical 1, and swap the pins. But the cards are not detected.For comparison, I tried running the examples of this library:
I removed some of the code to make it easier to understand the reasons, but the same conclusion was with the full text of the example code.
Running code on a faulty/incorrectly formatted
microSD:
512 MB
inserted512 MB
removedKnown good
microSD
:8 GB
inserted8 GB
removed32 GB
inserted32 GB
removedI would really like to understand the problem, but I lack some knowledge in the library codes, and in the operation of the
SPI
bus - since the main problem is in its configuration for two devices, as it seems to me.The text was updated successfully, but these errors were encountered: