How to configure LPSPI ASYNCHRONOUSLY for S32K358

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

How to configure LPSPI ASYNCHRONOUSLY for S32K358

1,135 Views
SaiCharanReddy
Contributor I

Hey 

We wanted to check write sequense of spi with WriteIB and Asynctransmit without any slave device connected on S32K358 just to verify we were able to send the frame from Micro.

Here for the first time we were able to see the Asynctransmit returning SPI_JOB_OK but not able to capture any pulses on DSO and for the second time it is setting SPI_JOB_PENDING.

If you have any configurations on how to check this scenario can you please help here

0 Kudos
Reply
5 Replies

1,103 Views
RomanVR
NXP Employee
NXP Employee

Hello @SaiCharanReddy.

To help further analyze the issue, could you please provide your SPI and additional drivers configuration details?
You can also refer to the following example for configuration reference: Example S32K344 SPI Transmit & Receive Using DMA DS3.5 RTD500. However, please note that you can refer to the differences between S32K358 and S32K344 SPI modules in the S32K3XX Reference Manual Rev. 9.

I look forward for your response.

- RomanVR.

Best Regards!
0 Kudos
Reply

1,093 Views
SaiCharanReddy
Contributor I

Hello @RomanVR,

Thankyou for the quick reply,

We are able to do the signal transmission with Sync Transmit using spi_writeIB and Spi_synctransmit and we were able to see the data on Oscilloscope.

But when we use the same configuration with AsyncTransmit we were not able to see the data on Oscilloscope.

We are using direct low level driver functions like spi_setupEB and Spi_Asynctransmit in below sequence.

   uint8 TxMasterBuffer[10] = {0x5A};
   uint8 RxMasterBuffer[10];
   uint8 ABC;
  
   while(1)
   {
    ABC = Spi_SetupEB(SpiConf_SpiChannel_SpiChannel_SBC_FS26,&TxMasterBuffer,&RxMasterBuffer,10);
    Spi_AsyncTransmit(SpiConf_SpiSequence_SpiSequence_FS2613);
   }
 
I have sent you some configuration xdm files in the attachment.

If you have any EB Tresos configuration example which can help us here with SPI Asynch mode to control BMS, That will be helpful

0 Kudos
Reply

1,041 Views
RomanVR
NXP Employee
NXP Employee

Hello @SaiCharanReddy .

Could you please share the specific RTD version used in your configurations?

You can find an example for SPI to FlexIO Async Transmission in the RTD 5.0.0 EB Tresos example folder.

Please let me know if this example helps and I will be waiting for your answer.

- RomanVR.

Best Regards!
0 Kudos
Reply

984 Views
SaiCharanReddy
Contributor I

Hello @RomanVR ,

We are using RTD 4.0.0 version for our project, We are trying to verify RTD 5.0.0 will let you know the results.

Thankyou.

0 Kudos
Reply

960 Views
RomanVR
NXP Employee
NXP Employee

Hello @SaiCharanReddy.

I have noticed that based on the configuration files shared, it seemsthat RTD 3.0.0 was used to generate these files as, shown in the image below. where The image with the yellow rectangle was extracted from the RM.xdm file, while the image with the green rectangle was extracted from an .xdm file of an RTD 4.0.0:

RomanVR_0-1741883994912.png

Please make sure that all project files are configured with the same RTD version as they are only compatible among files of the exact same version.

I will be looking forward to your response regarding the use of RTD 5.0.0.

- RomanVR.

 

Best Regards!
0 Kudos
Reply