The bootloader is configured by pin straps on certain pins. We use some
of those for other purposes in r9 which causes the bootloader to
misbehave if the device is reset from software. By switching these pins
from outputs to inputs just before reset this problem is avoided.
On the first spin of r9 one of the pins used for platform detection is
pulled up to VAA, not VCC, and VAA hasn't been switched on yet at the
time of platform detection. This results in r9 being misidentified as OG
from time to time.
As a temporary workaround until the next board spin, change the platform
from OG to r9 if it is detected as OG but has r9 pin straps.
Writing to the output bits in the TIMER3 external match register
resulted in intermittent failures that varied in likelihood from board
to board and from commit to commit for no apparent reason.
We've always specified that CLKIN should be DC (based on the Si5351C
documentation), but it has worked with AC input. AC coupling the buffer
input restores this undocumented feature.
- move CLKIN_DETECT to U23 pin 15, P4_8, CTIN_5
- move SGPIO13 to U23 pin 91, P2_5, GPIO5[5]
- rename SGPIO13 to TRIGGER_EN
This allows TIMER1/TIMER2 instead of TIMER3/TIMER0 to be used for CLKIN
detection, avoiding conflicts with PortaPack firmware.
SGPIO13 was never used for SGPIO, so it is renamed to reflect current
usage.
- move EN_1V8 to P5_0, U23 pin 37
- move !VAA_ENABLE to P6_10, U23 pin 100
- move !RX_AMP_PWR back to P2_12, U23 pin 106
Platform detection is now performed using P5_0 and P6_10 which avoids
the complication of having to detect a pull-up to VAA which may not yet
be switched on.
Additionally swap:
- EN_1V8, P6_10, U23 pin 100 (pull-down)
- !RX_AMP_PWR, P2_12, U23 pin 106 (pull-up)
Detecting which has the pull-up and which has the pull-down enables
version detection that may be more reliable than the ADC method.