WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi
I have a NUCLEO-F429ZI board, use PlatformIO and need two SPI Busses. So I initialised and used SPI1 and SPI3 as follows: const SPISettings spi_mot_settings(5000000, MSBFIRST, SPI_MODE3); const SPISettings spi_enc_settings(2600000, MSBFIRST, SPI_MODE3); SPIClass SPI_1(D11, D12, D13); // SPI1 mosi, miso, sclk SPIClass SPI_3(D22, D25, D23); // SPI3 mosi, miso, sclk SPI_1.begin(); SPI_3.begin(); SPI_1.beginTransaction(spi_mot_settings); SPI_3.beginTransaction(spi_enc_settings);
But it worked not right. Both transfers were visible on both busses.
I got it running with the following: SPIClass SPI_3(pinNametoDigitalPin(PB_5_ALT1), pinNametoDigitalPin(PB_4_ALT1), pinNametoDigitalPin(PB_3_ALT1)); // SPI3 mosi, miso, sclk; (D22, D25, D23)
Does it have to be so complicated or is there an easier way?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
SPIClass SPI_3(PB5_ALT1, PB4_ALT1, PB3_ALT1); // SPI3 mosi, miso, sclk; (D22, D25, D23)