2021-10-25 02:21 PM
I am attempting to drive some I2C 5.0v / 3.3v peripherals via the Sparkfun Arduino Qwiic Shield connected to an STM32H7451-DISCO.
I can't seem to raise the devices on the I2C bus despite being able to communicate with the audio codec and LCD which are on the same bus. I've tried all the usual tricks, shifting and not shifting the address, and also simply polling everything on the bus in sequence.
Am I making a wrong assumption that the levels will be ok with 3.3v coming from the DISCO, the Qwiic Shield being 5.0v / 3.3v and the devices being 5.0v / 3.3v compatible? Or should that be ok?
Solved! Go to Solution.
2021-10-26 03:02 AM
As the name suggests, the Sparkfun Arduino Qwiic Shield is intended for an Arduino operated with 5V so that 3.3V/5V I2C devices can be connected. To do this, it uses a well known level shifter with two n-channel logic level FETs and a few resistors. This level shifter is bidirectional and can be operated with 100kbit/s, possibly 400kbit/s, definitely not with 1Mbit/s.
Due to the 5V side fixed at the Arduino connectors, it works only from the 5V MCU down to devices with <= 5V, so to speak, not the other way around. That means you cannot use the shield without modification with MCU boards such as the DISCOVERY or NUCLEO that are operated with 3.3V.
If the problem is resolved, please mark this topic as answered by selecting Select as best. This will help other users find that answer faster.
/Peter
2021-10-26 03:02 AM
As the name suggests, the Sparkfun Arduino Qwiic Shield is intended for an Arduino operated with 5V so that 3.3V/5V I2C devices can be connected. To do this, it uses a well known level shifter with two n-channel logic level FETs and a few resistors. This level shifter is bidirectional and can be operated with 100kbit/s, possibly 400kbit/s, definitely not with 1Mbit/s.
Due to the 5V side fixed at the Arduino connectors, it works only from the 5V MCU down to devices with <= 5V, so to speak, not the other way around. That means you cannot use the shield without modification with MCU boards such as the DISCOVERY or NUCLEO that are operated with 3.3V.
If the problem is resolved, please mark this topic as answered by selecting Select as best. This will help other users find that answer faster.
/Peter
2021-10-26 08:09 AM
If I understand correctly then the problem is the downshift of 3.3v coming from the MCU meaning that the triggers are not sufficient?
My logic analyser arrives today. So my plan was to have a look at the signals and see what is going on. I'd been hoping to get away with the voltage range being just in spec with the shield.
The I2C devices themselves are 3.3v/5v capable so would it be correct to assume that I either:
2021-10-27 06:58 AM
I made some custom headers and wired this directly into the relevant pins on the arduino port on the DISCO and it works now.
Now I think about it I wonder why I didn't just do that in the first place. =)