I am running a STM32L452 on a custom board using the STM32Cube HAL. I am putting the uC into standby mode and am configuring some of the pins to pull up/down using the functions in the stm32l4xx_hal_pwr_ex.c library. One of pins I want to pull down is PA15 but unfortunately the HAL seems to make it so that you cannot enable standby pulldowns on this pin.
HAL_StatusTypeDef HAL_PWREx_EnableGPIOPullDown(uint32_t GPIO, uint32_t GPIONumber)
SET_BIT(PWR->PDCRA, (GPIONumber & (~(PWR_GPIO_BIT_13|PWR_GPIO_BIT_15))));
CLEAR_BIT(PWR->PUCRA, (GPIONumber & (~(PWR_GPIO_BIT_14))));
In the RM0394 Reference manual it says:
Power Port A pull-down control register (PWR_PDCRA)
Address offset: 0x24.
Reset value: 0x0000 0000. This register is not reset when exiting Standby modes and with
PWRRST bit in the RCC_APB1RSTR1 register.
Bits 31:15 Reserved, must be kept at reset value.
I know it is not good practice but before reading the reference manual I set PWR_PDCRA Bit 15 high to see what would happen. The pull down was enabled and I haven't seen any issues at all in my testing. I am interested if there is a more detailed explanation on why this pin should not be set to pulldown on standby.
It seems that the default setting is for it to pull up on standby and this is turning an LED on the board on. The result is that standby is not so low power. The PCB design is also very tight with few spare pins and any changes would be fairly difficult so I would like to avoid this if possible.
Any thoughts would be great,
Note: I Tried posting this last week and it got stuck in drafts with the message "Please note: your content was added successfully, but a moderator needs to approve it before it can be posted." I tried posting it again today and it worked with no issues. Anyone know what that's about?