Hello @danielmartynek,
Thanks for the investigation! I was already able to solve my problem through finding the struct and filling out the information for the struct.
I'll add my code for reference:
//current state of the i2c master channel status
Lpi2c_Ip_MasterStateType i2c0_dev_curr_state;
Lpi2c_Ip_BaudRateType i2c0_init_baudrate = {
//set baudrate struct (heavily affects frequency)
// currently set to ~400kHz
.Prescaler = LPI2C_MASTER_PRESC_DIV_8, // <-- changes SCL
.ClkHI = 4, // <-- changes SCL
.ClkLO = 4, // <-- changes SCL
.SetHold = 1, // check if changes SCL (data dependent so probably changes SDA)
.DataValid = 2,// check if changes SCL (data dependent so probably changes SDA)
//high speed is not used. Check configuration.mex file.
.ClkHIHS = 1,
.ClkLOHS = 3,
.SetHoldHS = 2,
.DataValidHS = 1
};
Lpi2c_Ip_MasterConfigType i2c0_master_config = {
//set master config
// .SlaveAddress = 0x68, //set in runtime
.Is10bitAddr = 0,
.OperatingMode = LPI2C_STANDARD_MODE,
.BaudrateParams = i2c0_init_baudrate,
.PinLowTimeout = 0,
.BusIdleTimeout = 0,
.GlitchFilterSDA = 1,
.GlitchFilterSCL = 1,
.MasterCode = 0,
.TransferType = LPI2C_USING_INTERRUPTS,
// .DmaTxChannel = NULL, //not using
// .DmaRxChannel = NULL, //not using
.MasterCallback = NULL,
.CallbackParam = 1,
.MasterState = &i2c0_dev_curr_state,
};