MBD TOOLS :S32K144 SPI interface application problem

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MBD TOOLS :S32K144 SPI interface application problem

918 Views
liuqimin
Contributor IV

Hi

  There is a SPI interface application problem. When I send an array with the following structure, the configuration of SPI is as shown in the figure below.

liuqimin_0-1606975801570.pngliuqimin_1-1606975828577.png

    In this case, is the sending order of the array 0->1? Another question is: Will the SPI interface automatically stop sending after the array is sent?

    My application needs to stop immediately after sending an array and wait for another array to be sent.

 Best Regards!

 Qimin Liu

0 Kudos
2 Replies

907 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @liuqimin 

The sending order is 0 1 2 3 4, I have replicated your mentioned scenario and had a look on the bus with a logic analyzer.

mariuslucianand_1-1606992906151.png

mariuslucianand_2-1606993067159.png

The SPI will send the uint8_t array and then stop, as you can see in the previous screenshot. You have selected the Continous transfer option, so the CS pin is set low at the beginning of the transfer and set high at the end.

Also, I've noticed that the data type of your transferred variables is double, so please check to be uint8.

Hope this helps,

Marius

 

 

0 Kudos

899 Views
liuqimin
Contributor IV

Hi  Marius     

    Thanks for your reply.    

    This state is exactly what I need.    

    If the SPI interface is connected to the back of a finite state machine, and the state machine modifies this array from time to time, can the SPI interface be sent correctly? The actual connection is as shown below.  

liuqimin_0-1606997481385.png

    The previous picture is just an example, the actual data sent is in uint8 format, thank you for your reminder  

Best Regards!  

Qimin Liu

0 Kudos