SPI slave #46270
Unanswered
Dave-Poissant
asked this question in
Q&A
SPI slave
#46270
Replies: 1 comment 1 reply
-
Also good to know, I have hooked up my MISO and MOSI lines together in order to simplify debugging it all. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I'm trying to make an SPI slave out of my stm32f411ce and I seem to be having a bit of trouble with the configurations (I think).
Context:
My program right now is only 2 threads running simultaneously. One is the main blinking a user LED at every XX delay. The other one is an spi handler thread which waits for a semaphore to be given in order to initiate any spi communication.
I have an arduino who pulls down the cs pin of my stm32f411ce which activates an interrupt which gives the said semaphore. This gives the chance to the spi handler thread to send or receive anything with adequatly set buffers and the spi device needed.
Now, if I put my device in master mode, everything is fine. Whenever i try to put it in slave mode, by adding in prj,conf
CONFIG_SPI_SLAVE=y
and changingSPI_OP_MODE_MASTER
forSPI_OP_MODE_SLAVE
in my spi_config struct, function spi_transceive(...) returns -22 (wrong arguments).Am I missing something in configs or am I suppose to be handling a slave differently?
blackpill_spi_test_zip.zip
Beta Was this translation helpful? Give feedback.
All reactions