Issues with SPI readWrite using Simulink Arduino Support Package

I'm using the Simulink Arduino Support Package to interface between an Arduino Due and a TI DAC714 using SPI protocol.
Configuration parameters used:
The SPI clock is set to 4000 kHz.
Slave Select Pin = 10;
The DAC714 takes in 16-bit data in binary two’s complement.
So to test out the SPI, I am sending a constant 6 in uint16 into the SPI readWrite Block Function to test the SPI connection.
The issues I am coming across is that I'm not seeing any changes in my pins:
1) I'm not seeing a serial clock signal when checking between the SPI CLK pin and GND in an oscillascope.
2) I'm also not seeing a data bit code between SPI MOSI pin and GND in the scope.
3) I'm seeing non-uniform switching (~10 us) in my SS pin 10 and GND in the scope.
I'm not sure what the SPI readWrite function is doing in Simulink and I tried to follow the Simulink IO video from Mathworks Youtube on how to program SPI with an EEPROM. I'm assuming that the function automatically converts the uint16 input into binary.

Answers (0)

Categories

Products

Asked:

on 18 May 2021

Community Treasure Hunt

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

Start Hunting!