2025-01-15 07:25 AM
Hello,
due to pin shortage, I (foolishly) used pin PC14 and PC15 as output GPIOs on a board that I designed and my colleague is writing the firmware. We never use them previously, due to the all problems with limited sourcing caused by internal backup domain power switch and their low-speed limits. For the current board, the low speed and low drive was no issue.
But now there is a problem - we are unable to get the pins working. I tried the code generated by CubeMX and my colleague, who uses own routines, used the approach described on several pages on the web - first disable the LSE in BDCR by cleaning the LSEON bit, wait for LSE deactivation, turn on the backup domain power, enable access by setting DBP bit, and finally normally set the pins as low-speed push-pull outputs. We tried all this, but the pins stay low all the time. For testing, we used a NUCLEO-F401RE, because the board is still being manufactured.
Could be the absence of the HSE crystal (or, a TCXO on our board) the culprit? We previously had problems to get the RTC working without the HSE. Note that the crystal (X2) on the NUCLEO-F401RE is not populated and both code runs with HSI RC.
2025-01-15 07:30 AM - edited 2025-01-15 07:31 AM
Hello @m864cdf4ac and welcome to the community.
For your information. From the datasheet / Table 8 / note 2:
2025-01-15 07:43 AM
Yes, we now this. This is the reason that we use the PC13 only as an activity ("blinky") LED, which draws barely tens of microamperes only (it's a very efficient LED). The catch is - the PC13 works without problems, the PC14 and PC15 don't.
2025-01-15 08:27 AM
Read out and check/post content of RCC_BDCR and GPIOC registers.
Make sure the jumpers/solder bridges on the board are disconnected from crystal and connected to whatever point you are measuring at (probably the pinheaders). See manual/schematics of board.
JW
2025-01-15 08:44 AM
I will check the bridges (the schematics show them as open by default and I am not sure if my colleague closed them), but IMHO the 32 768 Hz crystal could be happily ignored for DC/low-frequency signals (we tested with continuous H and 10 Hz square wave), because its capacity is only tens of picofarads and even low-current pin should be able to drive such load without problem.