Electronic – Software vs Hardware control

embeddedtexas instruments

I was reading the Tivaware datasheet on GPIO:
http://www.ti.com/lit/ug/spmu298a/spmu298a.pdf

When I came across this(page 257):

"where GPIO_DIR_MODE_IN specifies that the pin is programmed as a software controlled
input, GPIO_DIR_MODE_OUT specifies that the pin is programmed as a software controlled
output, and GPIO_DIR_MODE_HW specifies that the pin is placed under hardware control."

What is hardware vs software control in emb. prog?

Best Answer

It usually means when used as a GPIO software can control whether it is an input, output, enabled and so on. Basically software defines how the pin works. In a micro controller there are often hardware functions, perhaps multiple select-able hardware functions such as I2C that also come out pins. In this case you would do whatever needs to be done to put the pin under hardware control. So it becomes no longer a GP pin but an input or output pin of an internal hardware block.