STM32F103 as I2C slave the PlatformIO way? (non-Arduino?)

As I have trouble using Arduino Wire library for slave;

How do people solve I2C communications without Arduino?
are there some libraries or examples that works without Arduino framework, that are easy to implement?

Whenever I have i2c problems to solve, my first port of call is to shove a logic analyser into the circuit.

You can then decide the communications and see exactly what is being communicated.

AZ Delivery have a cheap, eight channel one on Amazon, but similar models are all over the place. The AZ one is the one I have, they are a reliable company to deal with.Also, most items have free EU delivery, sadly the UK is no longer in the EU. :sob:

Obviously, you have a scope so this reply is probably not all that helpful. Sorry!

https://www.amazon.co.uk/AZDelivery-Logic-Analyzer-24MHz-download/dp/B01MUFRHQ2?crid=2MQHPWZAURT1&dib=eyJ2IjoiMSJ9.aqVuYfwXcUgw3P0oE7NFduFSgZgeVp6oe43KKU7OnIPAUh4TiUNjNsMf3hoNTxiK.WCEbCbeRSF_ShIPqtlrvr2moBAwBygIVNVIRxA1ZmwA&dib_tag=se&keywords=AZ+delivery+logic+analyser&nsdOptOutParam=true&qid=1734168503&sprefix=az+delivery+logic+analyser%2Caps%2C220&sr=8-3

Once you see and decide the Comms, it’s a lot easier to work out what the code might be doing!

HTH

Cheers,
Norm.

I have the scope and Saleae Logic pro 16 but once the chip/I2C library goes bananas and gets stuck pulling the pin low permanently - that does not help.
Luckily I have the issue confirmed, and ST is working on it.

1 Like