Why I2C interrupt occured even I had absorted the transfer?

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

Why I2C interrupt occured even I had absorted the transfer?

150 Views
wengzhaojie
Contributor I

Hello,I am using I2C on S32K148. IDE is S32DS ARM2.2(version:1.0.0.202001161613)

The flow is:
(1) start a I2C transder by calling  LPI2C_DRV_MasterSendDataBlocking, which is using DMA.
(2) transfer time out
(3) call: 
LPI2C_DRV_MasterAbortTransferData
(4) call: 
LPI2C_DRV_MasterDeinit
(5) the I2C dma transfer error interrupt(EDMA_DRV_ErrorIRQHandler) occured, and drop into the DEV_ASSERT for no available I2C instance.

Why did this happened? And how can I avoid this?

0 Kudos
Reply
1 Reply

116 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @wengzhaojie,

Please refer to the documentation of the driver.

danielmartynek_0-1722863525177.png

 

The blocking transfer is completed when the function returns (with error or success status), there is nothing to abort.

danielmartynek_1-1722863618260.png

LPI2C_DRV_MasterAbortTransferData() can be used for non-blocking transfers.

danielmartynek_2-1722863701361.png

 

Regards,

Daniel

0 Kudos
Reply