I've configured the lpi2c1 like the example code with processor expert, but my i2c pins always stays in high level because the pull ups. The only difference is that my pins are the secondary, PTB9 and PTB10.
IOs:
lpi2c:
PCC (clock source):
in the main.c the 3 functions used:
LPI2C_DRV_MasterInit(FSL_LPI2C1, &lpi2c1_MasterConfig0, &lpi2c1MasterState);
LPI2C_DRV_MasterSetSlaveAddr(FSL_LPI2C1, 0x3E, 0);
LPI2C_DRV_MasterSendDataBlocking(FSL_LPI2C1, buffer, TRANSFER_SIZE, true, 10U);
I don't know if there is another configuration that I missed. I tried to put this pins to work as output and worked properly.
I tried a example that I found here in the forum and the functions stops when check the busy register: ((LPI2C0->MSR & (1 << 25)), always returns busy.
Thanks
How did you correct it ? I came up with this problem.THS
Hi,
Please see the description of PINCFG bit field in MCFGR1 register.
Regards,
Daniel
Hello,
Secondary Clock Line (SCLS) and Secondary Data Line (SDAS) are used only if master/slave are configured to used separate pins. Lpi2c driver doesn't support 4-wired mode, therefore SCLS and SDAS pins are not used.
The lpi2c driver works only if you use first SCL and SDA lines.
Best regards,
Alina