Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 70452

SPI on CRIO

$
0
0

Hi,

 

I am trying to use SPI communication on a CRIo9053 via a NI9401 and SPI slave FPGA lib. I use an ESP32 as master.

 

The GOOD: the CRIO is able to read 4 bytes from the master.

 

The BAD: However, when I try to write into the bus the ESP32 gets abnormal messages (sometimes no related with the expected message) and the cRIO is no longer able to read any mesaage from the ESP32.

 

SPI config at the FPGA:

Litos_0-1742915890057.png

SPI loop at the FPGA:

 

Litos_1-1742915931680.png

As you may see the SPI reads 4 bytes (32 bits) form the bus, and I expecting it to be able to write the same amount of data.

 

When checking the signals with the oscillo, I can see that the CRIO write (blue signal) is misplaced:

 

Litos_3-1742916285438.jpeg

 

I tried sending,1, 2, 3 ... to any high number and (1) the blue trace is not as it should be in its binary representation, and (2) reading stops working properly on the CRIO. You may see (yellow trace) that the messsages from the ESP32 master are there.

 

Am I missing something? clock signal is 1 MHz, and when no trying to send any meassge the CRIO can read without any problem.

 

Carlos

 

 

 

 

 

 

 


Viewing all articles
Browse latest Browse all 70452

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>