2017-01-20 03:39 AM
hello
started STM32CubeMX and selected the stm32f051k..,
then added the i2c peripheral and then selected the configuration->connectivity->i2c1 and finally gpio settings
noticed that the GPIO Pull-up/Pull-down drop down boxed could be selected for SDA and SCL
is this selection valid?
could the board pull-up resistors be eliminated?
checked the schematic of the stm32f0 discovery board (MB1034.pdf) did not notice any pull up on pins pb6, pb7 or pb10, pb 11
please let me know
regards
enzo
2017-01-20 04:27 AM
The internal pullup is usually too weak resulting in high RC constants with the connected devices' and the traces' parasitics, thus limiting communication speed; that's why external pullups are usually used. They are not present on the Disco board as there is no onboard I2C peripheral and they would potentially interfere with other possible use of the board.
JW
2017-03-21 01:38 PM
Hi JW,
I was looking for this kind of answer. It was helpful thanks.
I am not an OP, but I have a question. Does 'the internal pullup is usually too weak' mean the resistance is a way too high (around 40k from datasheet) for communication?
2017-03-22 02:20 AM
Well, the parasitic capacitance of IO pins are around 5-15pF, and 40-50kOhm * few_tens_of_pF = around 1us rise time. The I2C specification prescribes 1us as max rise time for both SCL and SDA for the normal mode, a.k.a. 100kHz. So, it may be marginally good for the slowest speeds, with very short traces, and on a board with no significant source of noise (especially high-frequency switching (read: fast edges rather than data rate)) which could be coupled into such high impedance lines easily. That's too many problems which all could be prevented easily by two cheap resistors.
The OP asked for connecting I2C device to a Disco board. That means using external leads, and often people tend to use those terrible breadboards for interconnections, those introduce more than only a few pF of parasitics... etc.
JW
2017-03-29 06:09 PM
Oh RC time constant. I didn't think about that. thanks so much for help.