In this specific case, I'm trying to determine how GPIOs declared as inputs are initially configured on an XL208 processor. The datasheet states the following:
The subsequent table shows pulldowns on all the inputs I'm interested in.PD/PU: The IO pin has a weak pull-down or pull-up resistor. On GPIO pins this
resistor can be enabled. This resistor is designed to ensure defined logic input
state for unconnected pins. It should not be used to pull external circuitry.
However, xs1.h defines set_port_pull_up() and set_port_pull_down() functions, with the following comments:
On XS2 and XS1-G devices calling set_port_pull_up() has the side effect of configuring the port in drive low mode.
It's not explicitly stated anywhere that I've seen, but I'm inferring that the same configuration setting controls how the pin is driven when in output mode and pullup/pulldown in input mode...is this correct?On XS2 devices calling set_port_pull_down() has the side effect of configuring the port in drive high mode.
Finally, the XMOS XS2 Architecture reference states:
and:A port is initially OFF with its pins in a high impedance state.
The table showing the configuration defaults has 3 settings: DRIVE, PULLDOWN, and PULLUP, with the default being DRIVE...which I assume means no pullup or pulldown for inputs.Initially, the port is ready for input.
So I have one reference stating there's a pulldown (initially active? Supported and able to be enabled, with no pullup functionality available?), one stating that there's both pullups and pulldowns available, and one stating both that the port is initially off and that it is initially configured for input. All of which leaves me rather uncertain as to the initial state or the capabilities of my ports.
Nowhere have I seen an actual schematic or diagram of the port. Does such a thing exist anywhere?