Which Simulink SPI block supports Teensy 4.0? My library only shows C2000 and STM32 options, but Teensy 4.0 uses an NXP i.MX RT1062.

I am trying to use SPI in Simulink with a Teensy 4.0. My board target is Teensy 4.0, but when I look at the available SPI Transmit block options, I only see libraries for C2000 and STM32 families. Since Teensy 4.0 uses the NXP i.MX RT1062, I do not know which SPI block is supposed to be used, or whether SPI is supported through the Simulink Support Package for Arduino Hardware at all. Is there a built-in SPI block for Teensy 4.0, or do I need to use a custom block instead? If Teensy SPI is supported, where is the correct library path?

Answers (2)

For those who will have the same questions as myself: After many hours, I have solved my issue. Using the SPI read write block, and selecting the Chip Select pin appropraitly, I was able to comunicate with each sensor sucssefully. The two screen shots show the start up sequencer block layout, wher reg and val change at each step for the first few steps (then the system is disabled), and the second screen shot shows how I ask the sensor for data (after startup).

Asked:

on 13 Mar 2026

Answered:

on 16 Mar 2026

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!