9-bit SPI, any more accessible on Teensy 4.0 ?

quiver

Active member
Hi folks,

There was this old discussion about 9-bit SPI on Teensy 3.2. I wondered if it's any more accessible on Teensy 4.0 ?

Does the MCU allow for it? If so, is there some code I can find to initialise this, or modify the SPI library to allow it?

Many thanks!
 
FWIW, I did get this to work by modifying the SPI.cpp file in Paul's SPI library.

C++:
port().TCR = (tcr & 0xfffff000) | LPSPI_TCR_FRAMESZ(8);  // turn on 9 bit mode

Literally just pinched that from the transfer16 function in there (duplicated the function, tweaked it some) tested it and it came up perfect on the scope right away.

Should be noted I'm writing only as that's all my application required.
 
Back
Top