Question
How to make my stm32 mcu which is a i2c slave respond with a known data upon address match
My stm32 mcu is a i2c slave device.
- When master sends the address on the bus, I want stm32 to respond with a known byte upon address match. How can I do that?
- I want to send different type of data with different size to the stm32 slave. How can I make my stm32 interpret what kind of data master has sent ?
Generally, I2C slaves have a dedicated register for a specific data. But since this is stm32 mcu it does not have a resister map to store different kind of data in a separate register. It has to interpret everything from what it receives in the RXDR register.