STM32 - 2. SPI-Bus
-
Hi,
I have an RFM69 and an MFRC522 card reader (with different SS) on the STM32. Unfortunately, the RFM has some problems as soon as the card reader is attached to the SPI.
Now the STM32 has several SPI, unfortunately I lack some programming knowledge to change the source code of the affected libraries to change one to port 2.
I have seen the example of the STM32 Arduino library, but I don't know how I could "incorporate" it into the mysensors.
Maybe it's quite simple (if you know how)?
greetingsHyx
-
Hi,
I have an RFM69 and an MFRC522 card reader (with different SS) on the STM32. Unfortunately, the RFM has some problems as soon as the card reader is attached to the SPI.
Now the STM32 has several SPI, unfortunately I lack some programming knowledge to change the source code of the affected libraries to change one to port 2.
I have seen the example of the STM32 Arduino library, but I don't know how I could "incorporate" it into the mysensors.
Maybe it's quite simple (if you know how)?
greetingsHyx
Hi @hyx, welcome to the forum!
I have not tried it, but it might not be harder than adding
#include <SPI.h> SPIClass SPI_2(2); //Create an SPI2 object. #define RFM69_SPI SPI_2before including MySensors.h
And modify line 108 in https://github.com/mysensors/MySensors/blob/development/drivers/RFM69/new/RFM69_new.h so RFM69_SPI doesn't get redefined (add an ifndef around it).
Reference: https://www.stm32duino.com/viewtopic.php?t=278
An alternative (less elegant but maybe easier) could be to use softspi.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login