I am looking for some clarification using the I2C component for the S32K144. I currently have my Component Inspector set to:
I have separately established communications with configuration 0 and configuration 1. I'm not exactly sure how NXP intended us to communicate to each slave when multiple slaves are present. It looks like the functions present in the Kinetis line of Processor Expert pass the Config along with the data for sending and receiving. That is not present on the S32K.
I have a semaphore set up which uses the LPI2C_DRV_MasterSetSlaveAddr function to switch the address so I can communicate with each slave. Another option would be to Deinit, then Init with the Config that contains the desired slave address. What was NXP intending to do here?
It is possible that the I2C module is still being development.
Hello Jeremiah,
You are right, in order to communicate with another slave you must call LPI2C_DRV_MasterSetSlaveAddr() with the new slave address. After this, all transfers will use this address, until the next call to LPI2C_DRV_MasterSetSlaveAddr().
It is also possible to call Deinit and then Init again with a new configuration, but this would consume much more processing time.
Best regards,
Cristian