S32K IIC slave receive data length

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

S32K IIC slave receive data length

1,573 Views
lingyunzhi
Contributor I

When receive a iic command, then trigger I2C_SLAVE_EVENT_STOP event,at this point, how I know the the length of received data?

0 Kudos
Reply
2 Replies

1,062 Views
philip20200426
Contributor II

Hi,

s32k312 is IIC slave.

1. When will I2C_SLAVE_EVENT_TX_REQA be received, before or after data is sent? 

2. After receiving the data sent by the host, which function should be called when the S device returns the data?

 

Project info as follows:

* Project : RTD AUTOSAR 4.4
* Platform : CORTEXM
* Peripheral : LPI2C
* Dependencies : none
*
* Autosar Version : 4.4.0
* Autosar Revision : ASR_REL_4_4_REV_0000
* Autosar Conf.Variant :
* SW Version : 2.0.3
* Build Version : S32K3_RTD_2_0_3_D2302_ASR_REL_4_4_REV_0000_20230217

0 Kudos
Reply

1,564 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @lingyunzhi,

You did not specify the MCU nor the drivers.

But anyway, this is application-dependant.

There are other events (SDK) like RX_REQ which should be processed before EVENT_STOP is detected.

I2C_SLAVE_EVENT_RX_FULL = 0x00U,
I2C_SLAVE_EVENT_TX_EMPTY = 0x01U,
I2C_SLAVE_EVENT_TX_REQ = 0x02U,
I2C_SLAVE_EVENT_RX_REQ = 0x03U,
I2C_SLAVE_EVENT_STOP = 0X04U,

 

BR, Daniel

 

0 Kudos
Reply