@DanNguyenDuy
even i add installHandler INT_SYS_EnableIRQ(LPI2C0_Master_IRQn); or set MCR MIER ISER register,
but still can't enter LPI2C_DRV_SlaveIRQHandler(0); what is problem ? did you run my project and enther i2c irq ?
/* Install Button interrupt handler */
INT_SYS_InstallHandler(LPI2C0_Master_IRQn, vPort_i2C0_ISRHandler, (isr_t *)NULL);
/* Enable Button interrupt handler */
INT_SYS_EnableIRQ(LPI2C0_Master_IRQn);
//LPI2C0->MCR |= 0x09;
//LPI2C0->MIER |= 0x01;
//S32_NVIC->ISER[0] |= 0x01000000;
static void prvSetupHardware( void )
{
int i = 1;
lpi2c_master_state_t lpi2c1MasterState;
/* Initialize and configure clocks
* - Setup system clocks, dividers
* - see clock manager component for more details
*/
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);
LPUART_DRV_Init(INST_LPUART1, &lpuart1_State, &lpuart1_InitConfig0);
LPI2C_DRV_MasterInit(INST_LPI2C1, &lpi2c1_MasterConfig0,&lpi2c1MasterState);
boardSetup();
// LPUART_DRV_Init(INST_LPUART1, &lpuart1_State, &lpuart1_InitConfig0);
AMS_LOG("prvSetupHardware=%d\n",i);
/* Install Button interrupt handler */
INT_SYS_InstallHandler(BTN_PORT_IRQn, vPort_C_ISRHandler, (isr_t *)NULL);
/* Enable Button interrupt handler */
INT_SYS_EnableIRQ(BTN_PORT_IRQn);
/* Install Button interrupt handler */
INT_SYS_InstallHandler(LPI2C0_Master_IRQn, vPort_i2C0_ISRHandler, (isr_t *)NULL);
/* Enable Button interrupt handler */
INT_SYS_EnableIRQ(LPI2C0_Master_IRQn);
//LPI2C0->MCR |= 0x09;
//LPI2C0->MIER |= 0x01;
//S32_NVIC->ISER[0] |= 0x01000000;
/* Enable global interrupt */
INT_SYS_EnableIRQGlobal();
/* The interrupt calls an interrupt safe API function - so its priority must
be equal to or lower than configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY. */
INT_SYS_SetPriority( BTN_PORT_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY );
INT_SYS_SetPriority( LPI2C0_Master_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY + 1 );
}