Why I2C interrupt occured even I had absorted the transfer?
08-01-2024
07:48 PM
346 Views
wengzhaojie
Contributor I
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
1 Reply
08-05-2024
06:16 AM
312 Views
danielmartynek
NXP TechSupport
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @wengzhaojie,
Please refer to the documentation of the driver.
The blocking transfer is completed when the function returns (with error or success status), there is nothing to abort.
LPI2C_DRV_MasterAbortTransferData() can be used for non-blocking transfers.
Regards,
Daniel