I2C Slave

Post here first, or if you can't find a relevant section!
Post Reply
luke_par
Posts: 5
Joined: Thu Jun 04, 2020 2:03 pm

I2C Slave

Post 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
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: I2C Slave

Post 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 ?
luke_par
Posts: 5
Joined: Thu Jun 04, 2020 2:03 pm

Re: I2C Slave

Post 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.
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: I2C Slave

Post 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.
luke_par
Posts: 5
Joined: Thu Jun 04, 2020 2:03 pm

Re: I2C Slave

Post by luke_par »

But Wire is only used for I2C?
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: I2C Slave

Post by fpiSTM »

Sorry, SPI :) but your topics is I2C slave ...
luke_par
Posts: 5
Joined: Thu Jun 04, 2020 2:03 pm

Re: I2C Slave

Post by luke_par »

Sorry, was a mistake on my part :)
luke_par
Posts: 5
Joined: Thu Jun 04, 2020 2:03 pm

Re: I2C Slave

Post by luke_par »

How can I change it?
Post Reply

Return to “General discussion”