Using SPI1 instead of SPI at Teensy 4.1

moritz74

New member
Hello all,

I have a question using SPI1 for my project.
How can I use SPI1 instead of SPI on the Teensy 4.1? I'm having trouble with the SCK and MOSI pins. Specially with the SCK. The following code isn't working:

SPI1.setSCK(27);
SPI1.setMOSI(26);
SPI1.begin();
SPI1.beginTransaction(SPISettings(14000000, MSBFIRST, SPI_MODE0));

Or do I have to set something somewhere else?

Thanks for your help
 
Note: Those are the only valid pins for SPI1, so they should just work. Setting them again should not hurt anything.

So this should work, however you don't have any code here the actually does any transfers, so hard to say.

That is, I don't see anything like: SPI1.transfer(some_value);
 
Back
Top