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:

SPI loop at the FPGA:

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:

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