About STM32's GPIO port input/output data register

About STM32's GPIO port input/output data registerAbout STM32's GPIO port input/output data register Off to S T M . 3 2 of G P the I O terminal port input into / output a number of data registers memory device

It used to be thought that the GPIO input data register and the output data register are completely separated and not related to each other, but today I discovered that they are connected somewhere. As follows: It
Basic structure of GPIO port
can be seen that if the output data register is set, it should have an impact on the input data register; and the connection state of the input data register is controlled by TTL Schmitt trigger.

Use the code written before to test the connection between the input data register and the outside, and get the value of GPIOx_IDR:
GPIO input register

It is found that after setting the clock corresponding to GPIO, GPIOx_IDR has data, which means that GPIOx_IDR has been connected to the outside world at this moment.

When configured as input or output as follows:
Input configuration
Output configuration

emmm, I feel that this matter is purely personal curiosity, it doesn't seem to make much sense, used to pretend to be forced!

Guess you like

Origin blog.csdn.net/weixin_41629848/article/details/98884980