s32k144 spi transfer for interrupt

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

s32k144 spi transfer for interrupt

700件の閲覧回数
fengba_360
Contributor III

Hello, I'm using an S32K144 and transmitting data via LPSPI using interrupts. When the slave device is not operational, the S32K144 keeps entering the SPI interrupt and calling LPSPI_DRV_FillupTxBuffer(instance) to send data. This results in the main function of the program not running as expected, even though I'm calling LPSPI_DRV_MasterTransfer to send data periodically at 1ms intervals. Can you help analyze what might be causing this issue?微信图片_20240827234955.png

0 件の賞賛
返信
3 返答(返信)

669件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @fengba_360,

What do you mean by "the slave device is not operational"?

Do you monitor the bus with an oscilloscope?

What SDK version is it?

Can you share the project either here or privately via a support ticket?

 

Thank you,

Daniel

 

0 件の賞賛
返信

666件の閲覧回数
fengba_360
Contributor III

I'm not using an oscilloscope to monitor the bus temporarily. I used Freemaster to monitor variables. The slave is a chip that supports SPI communication.

sdk verision:3.0.0  

I apologize that I cannot share the project due to company policies. The situation I'm monitoring is that the master is not sending data all the time, but the SPI keeps entering the data transmission interrupt, as shown in the image above.

0 件の賞賛
返信

655件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

How many frames do you send in one transfer call?

You should see how the internal structure of the driver changes each call within the LPSPI_DRV_FillupTxBuffer() function.

Or, can you call LPSPI_DRV_MasterGetTransferStatus() to get the status and remaining bytes?

Does it work with the LPSPI_DRV_MasterTransferBlocking() function?

 

Thanks,

Daniel

0 件の賞賛
返信