2018-01-22 05:39 AM
how can i implement 3 I2C buses on a STM32 LO family.
looking at the data sheet for pin mapping this are mapped in to PB & PA buses
with alternative Mode does not allow all 3 to be expossed, as these are spread across AF6 & AF7
Can this part support 3 IC2 buses, or do i need to look at a new part
we only need 3 I2C busses and a few GPOI
2 Of these buses must support ARP. so that limits us to L0, L4, F3 families
Davey
2018-01-22 06:23 AM
2 Of these buses must support ARP
Can't you bit-bang the third one?
JW
2018-01-22 06:32 AM
Yes, it is a pretty universal problem - not just STM32 - that the full complement of peripherals often can't be accessed due to pin restrictions.
Why do you need 3 separate I2C busses?
There are I2C hub/switch/router chips available ...
2018-01-22 08:09 AM
And chips supporting multiple instances via address straps.
At Philips we'd run entire TV and CD subsystems with a single bus, the bus was designed for low pin count interconnecting multiple boards.
2018-01-22 08:09 AM
Which L0 (L Zero) part specifically are we talking about, some of the smaller parts have more restricted escape scenarios.
You'd want to escape 6 individual pins, each with it's own AF setting to assign it to a specific I2Cx peripheral.
There might be some hackery if you are a master, where you can switch between SDA AF settings on a transactional basis sharing a common SDA pin, and have 3 independent SCL pins.
2018-01-22 08:52 AM
Indeed - the whole point of a bus is exactly that it can be shared by multiple devices!
'bus' is short for 'omnibus' which, as Michael Flanders tells us:
comes from the Latin, 'omnibus', meaning to or for, by, with, or from everybody - which is a very good description!
This song is about a bus, it's wittily subtitled - (I thought of this) - 'A Transport of Delight'.
2018-01-22 09:04 AM
I'm with John Cleese, I like my buses with 32 bits rather than something bit with half a ferret armoured car.
https://www.youtube.com/watch?v=dPmiC_Zt88I