Question
ack generated once in I2C slave receiver mode
Posted on August 30, 2011 at 11:07
Thanks in advance,Gaston #i2c
Hello,
I'm using STM8L152C6 as a slave I2C device. I'm able to receive the first byte with acknowledge but successive rx data go along with NACKs. Here's my I2C configuration:CLK_PeripheralClockConfig(CLK_Peripheral_I2C1, ENABLE);
CLK_SYSCLKDivConfig(CLK_SYSCLKDiv_1);I2C_DeInit(I2C1);I2C_Init(I2C1, 80000,DATACOMM_SLAVE_ADDRESS<<1, I2C_Mode_I2CI2C_DutyCycle_2, I2C_Ack_Enable, I2C_AcknowledgedAddress_7bit);// Enable I2C InterruptI2C_ITConfig(I2C1,(I2C_IT_TypeDef)(I2C_IT_EVT | I2C_IT_BUF), ENABLE); // Set I2C IT software priority as highestITC_SetSoftwarePriority(I2C1_IRQn, ITC_PriorityLevel_3);How should assert successive ACKs after receiving the first byte?Could someone help me with this issue?I also attach a screenshot of the I2C timing for further information.
Thanks in advance,Gaston #i2c