S32K144-Q100 - SPI configuration using Interrupt

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

S32K144-Q100 - SPI configuration using Interrupt

447 Views
SivakumarMariappan
Contributor II

Hello Many thanks for your excellent support and service. I have started getting grip on the MCU, IDE and Documentation stuff as well.

Here is my design

1. Init LPSPI0 using Interrupt method and configure for 32 bits, 1 mbps baud rate as a Master.

2. In Main loop at every 10 mSec, I need to update an arrary of 16 elements. Each element is 32 bit length.

3. We need to transfer an Array of 16 parameters through SPI using interrupt method. Each parameter is 32 bit word.

4. Using a FOR loop we need to do the following

a. Update the 1st parameter

b. Check if Transmission is completed

c. Update the 2nd parameter

d. Check if Transmission is completed

e. Complete all 16 parameters using this FOR loop.

Now I would like to clarify the following points for me to continue my development.

1. What is the difference between "LPSPI_DRV_MasterTransfer" function and "LPSPI_DRV_MasterTransferBlocking" function?

2. Which function is best suitable for my application please?

3. Do we get the interrupt after every parameter transmission is completed or after 16 parameters are transmitted, if using your SDK function?

4. Where can see the LPSPI Interrupt declaration and definition please?

5. Shall we use "LPSPI_DRV_MasterGetTransferStatus" to confirm the transmission is completed?

6. Does this function "LPSPI_DRV_MasterGetTransferStatus" confirm each 32 bits Transmission is completed or entire array of 16 parameters Transmission is completed?

7. Please define the function flow / logic flow in simple steps in Main function and in Interrupt to transfer this 16 parameters (each 32 bit length)

8. If we are using LPSPI0 as a master, how do we handle this "receiveBuffer" please? What we need to pass on through "receiveBuffer" in the following function?

status_t LPSPI_DRV_MasterTransfer(uint32_t instance, const uint8_t * sendBuffer, uint8_t * receiveBuffer, uint16_t transferByteCount)

9. The above function supports transmitting 8 bit data. If we are using the above function to transmit 12 parameters and each parameter is 32 bit length, what changes are required in the init function and main function "LPSPI_DRV_MasterTransfer" please?

10. If we need to use polling method as LPSPI0 master to transmit this 16 parameters, is there a SDK function available to support please? If yes, what is the function name?

11. If there is a SDK function to support polling method as a LPSPI0 master, Please define the function flow / logic flow in simple steps in Main function.

I hope I'm clear with all my questions. If not, please call me back on my mobile +44 7934 466587 to discuss in detail.

0 Kudos
Reply
1 Reply

418 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

I see this was already answered via support Case you also entered.

BR, Petr

0 Kudos
Reply