Hi,
Im using s32k144 EVB for i2c implementation. when i try to verify the data which im sending through the controller using logic analyzer im not getting the proper data through SDA line .
im using PA2 and PA3 for SCL & SDA im attaching my code and snap shot of the SCL & SDA signals please look into it and let mw know where i have did wrong.
#include "Cpu.h"
volatile int exit_code = 0;
const uint8_t txbuff[8]={0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18};
lpi2c_master_state_t lpi2c1MasterState;
const lpi2c_master_user_config_t lpi2c1_MasterConfig0 = {
.slaveAddress = 60U,
.is10bitAddr = false,
.operatingMode = LPI2C_STANDARD_MODE,
.baudRate = 0,
.transferType = LPI2C_USING_INTERRUPTS,
.dmaChannel = 0U,
.masterCallback = NULL,
.callbackParam = NULL,
};
int main(void)
{
/* Write your local variable definition here */
/*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/
#ifdef PEX_RTOS_INIT
PEX_RTOS_INIT(); /* Initialization of the selected RTOS. Macro is defined by the RTOS component. */
#endif
/*** End of Processor Expert internal initialization. ***/
/* Write your code here */
CLOCK_SYS_Init(g_clockManConfigsArr, CLOCK_MANAGER_CONFIG_CNT,g_clockManCallbacksArr, CLOCK_MANAGER_CALLBACK_CNT);
CLOCK_SYS_UpdateConfiguration(0U, CLOCK_MANAGER_POLICY_AGREEMENT);
PINS_DRV_Init(NUM_OF_CONFIGURED_PINS, g_pin_mux_InitConfigArr);
LPI2C_DRV_MasterInit(INST_LPI2C1, &lpi2c1_MasterConfig0,&lpi2c1MasterState);
for(uint8_t data=0x00;data<0xFF;data++)
{
LPI2C_DRV_MasterSendDataBlocking(INST_LPI2C1,txbuff,sizeof(txbuff),1,1000);
}
}
bhanu_p_0-1725273184437.png