Question
MCU restarts after I2C->CR2 |= I2C_CR2_START; during setting I2C_GenerateSTART
I am trying to get I2C communication working between two STM8S003F3P6.
From I2c master I am trying to initiate I2C start message using CR2 registers with below code
#define I2C_CR2_START ((uint8_t)0x01) /*!< Start Generation */
.....
I2C->CR2 |= I2C_CR2_START;
But executing I2C->CR2 |= I2C_CR2_START; immediately restart and it keeps crashing at the same line.
Can someone please help what is possible cause of it, and how to get over this issue
