Hi
Seems that you configure I2C ignore NACK in LPI2C_init: LPI2C Master will treat a received NACK as if it (NACK) was an ACK
void LPI2C_init(void){PCC->PCCn[PCC_LPI2C0_INDEX] |= PCC_PCCn_PCS(2) /* Clk src: SIRCDIV2_CLK */| PCC_PCCn_CGC_MASK; /* Enable clock for LPI2C0 */LPI2C0->MCFGR1 = LPI2C_MCFGR1_PRESCALE(2) /* Prescale = 4*/|LPI2C_MCFGR1_IGNACK_MASK; /* Ignore NACK*/
Hello @Robin_Shen
Will you modify my code, as I am unable to do it.
I hope to hear you soon.
Thank You
Sorry, have you modified the IGNACK settings and tested? Will the NDF(NACK Detect Flag) be set now?
Since there are many cases to be handled recently, I have not had time to modify and test your project.