Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Can TESTMODE pin 33 (PA8) on P1 be used as an extra P1S6 pin? #1059
It looks like this pin was overlooked as a useable pin, given that it's name was indicated as TESTMODE it was deemed a reserved pin.
A new pin
A definition here:
And TOTAL_PINS bumped to 31 for P1 here:
That should allow use of pinMode(P1S6, OUTPUT) and digitalWrite(P1S6, LOW)
This should ensure the pin gets set as an INPUT floating by default. change to pin<=30
Since a TIM1_CH1 is on PA8, we will want to explore all of the timer based peripherals this may affect as well (PWM, Tone, Servo, Gen purpose timers, etc..)
The P1 datasheet would need to be updated as well, or at minimum an issue logged to update it.
After a deeper dig in implementing the above changes. Using this application:
it appeared that WICED was re-initializing this pin again since STARTUP() will run right at boot. I looked all over and finally tracked it to some initialization code in WICED that appears to use this pin in its alternate function MCO1 as the Main Clock Output 1 which is connected to the LSE (32kHz) oscillator. When you look at the pin on a scope, it's not 1.65V... it's a 50% DC squarewave oscillating at 32kHz. WICED uses this pin as a clock for powersave mode. Wi-Fi Powersave Mode is not enabled by default, and when taking over this pin as a GPIO it doesn't appear to crash the Wi-Fi which is further validation that it's not currently used. However it's most definitely hooked up as a standby clock source. For documentation sake, the WICED function called is