cancel
Showing results for 
Search instead for 
Did you mean: 

Using Sparkfun Arduino Qwiic Shield with STM32H7451-DISCO

SNort.1
Associate II

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?

1 ACCEPTED SOLUTION

Accepted Solutions
Peter BENSCH
ST Employee

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

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

3 REPLIES 3
Peter BENSCH
ST Employee

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

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

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:

  1. mod the Shield or,
  2. Could I just pipe these directly into the Grove I2C connection of the daughter board that comes with the STM32H7451-DISCO?
SNort.1
Associate II

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. =)