New to STM32 / CubeIDE, where to start for an I2C Slave?
Hi There,
the goal is to get data from an MCU via I2C to a Raspberry Pi. I already have this working with ATMegas but would like to move to the STM32 Platfrom.
Seems I'm quite spoiled as all I needed to get I2C working was this:
void sendData(){
byte buffer[32];
for(i = 0; i < 32; i++) {
buffer[i] = i;
}
Wire.write(buffer, 32);
Wire.begin(SLAVE_ADDRESS);
Wire.onRequest(sendData);(the buffer would be filled with useful stuff of course).
When programming the MCU via the Platform IO the i2cdetect on the RPI detects it - wiring seems ok
Now I got myself set up with the new CubeIDE, using a SMT32F103C8T6 for now.
Got LEDs blinking, yay.
Did setup I2C1 for PB6&7 (loving the device configuration tool), set the slave address. Hoping this would be enough to detect it from the RPi.
Searching for Examples I started to realize it won't be 2 only 2 lines as I am used to. This is not a problem, the problem is:
Where to start? What is the 'propper' way to set up a I2C Slave which shares a bunch of floats via I2C?
