GPIO Toggle Question
Hello,
The i2c peripheral should handle the toggling by itself(supposed you assigned the pins to their peripheral function). There is no need to toggle in source code. As soon as you or the hal library writes something in the transmit data register of the peripheral it copies the data in the shift register if it is empty. Then it automatically generates the start signal, the clock and beginns to shift the data on the dataline.(supposed the i2c is enabled and has a clock)
In your manual it should say something like this:
"If the I2C_TXDR register is not empty (TXE=0), its content is copied into the shift register
after the 9th SCL pulse (the Acknowledge pulse). Then the shift register content is shifted
out on SDA line."
What would be the purpose of a i2c peripheral if you had to do everything by yourself? 😀
Bab