Page 1 of 1

I2C Slave

Posted: Thu Jun 04, 2020 2:07 pm
by luke_par
Hello,
I would like to use an STM32 as SPI slave, which sends data to an SPI master on request of the master. Unfortunately all Arduino examples are Atmega specific. Does anyone have a source code example for me?

Thanks

Re: I2C Slave

Posted: Thu Jun 04, 2020 2:24 pm
by fpiSTM
Hi,

which core you used?
viewtopic.php?f=2&t=301

I guess this issue was opened by you: https://github.com/rogerclarkmelbourne/ ... /issues/97
So I guess you use LibMaple ?

Re: I2C Slave

Posted: Thu Jun 04, 2020 3:31 pm
by luke_par
Thanks for your quick response.

Yes I opened the issue but closed it again immediately, because I noticed that it is in the wrong area.

I use a ST Nucleo L412KB with a STM32L412KBU6U.

Re: I2C Slave

Posted: Thu Jun 04, 2020 4:45 pm
by fpiSTM
You don't really answer the question.
Anyway as you used an L412, I guess you used the STM32 core.
Then in the Wire example you will find what you are looking for.

Re: I2C Slave

Posted: Thu Jun 04, 2020 5:33 pm
by luke_par
But Wire is only used for I2C?

Re: I2C Slave

Posted: Thu Jun 04, 2020 6:27 pm
by fpiSTM
Sorry, SPI :) but your topics is I2C slave ...

Re: I2C Slave

Posted: Thu Jun 04, 2020 6:32 pm
by luke_par
Sorry, was a mistake on my part :)

Re: I2C Slave

Posted: Thu Jun 04, 2020 6:33 pm
by luke_par
How can I change it?