I am using S32K144 for my product.
I have different I2C slaves connected to S32K144 which I need to access periodically.
How do I manage them in processor expert?
It looks like I need to call Master_Init function every time while accessing a different I2C slave.
Is there any better way?
Besides calling Master_Init every time you switch to a different slave, you can also change the address or other params in below 2 variables directly.
/*init i2c master,only need to call for one time*/
/*Address which is set in PE will be communicated by default*/
when you want to switch to a different slave ID, just change the value of the below variable.
lpi2c1_MasterConfig0.slaveAddress = I2C_ADDRESS_CS2100;
I2C_StateUser.slaveAddress = I2C_ADDRESS_CS2100;
/*Address of I2C_ADDRESS_CS2100 will be communicated*/