2021-01-27 02:23 AM
In an application we use PB4 as output. Corresponding to the datasheet, this port only can be used with open-drain. In the datasheet in the I/O port pin characteristics there are values of 30k up to 80k for pull-up resistor Rpu. Is this meant for the internal pull up resistor?
I put 10k up to 3.3V. And with this value, I only get about 2.7V as high. If I put 30k, there will only be about 2V.
So, what are the usual values you put on these o.d ports on STM8?
2021-01-27 07:51 AM
The 30...80k for Rpu only affect the pins with pull-ups On the STM8S001J3M3 pin PB4 is a so-called True Open Drain, i.e. no P-buffer, weak pull-up, nor protection diode to VDD (see datasheet, table 5, footnote 4).
This means that you can connect any pull-up you want - according to the required current range, e.g. max I(pu)=1...2mA, which results in the pull-up as VDD/I(pu). Usual values would be in the range of 2.2...33kohms, depending on your requirements.
Regards
/Peter