BOR Ultra Low Power Enable - STM32U575
I am trying to test out the Stop2 mode on the STM32U575 (Specifically the NUCLEO-U575ZI-Q) but am getting very high currents in the mAs. I am putting the device into Stop2 mode with the MSIS as the system clock at 4MHz. I then set the Power Regulator Voltage Scale to "Power Regulator Voltage Scale 4" from the RCC window in the .ioc view.
I do have some GPIO active like the various test LEDs and 1 UART enabled but I have tried disabling all pins and peripherals with no improvement. With this configuration I am pulling ~8mA.
I have read that in order to get lowest possible power, the ultra low power mode on the BOR needs to be enabled using the ULPMEN bit in the PWR register. When I try to write to this bit, it never gets set. Not sure why I cant enable this? And I have not been able to find a clear definition of what this even is? It configures the BOR in "discontinuous mode"?
Here is a snippet of my simple test code:
HAL_SuspendTick();
uint16_t test = READ_REG(PWR->CR1);
HAL_PWREx_EnableUltraLowPowerMode();
test = READ_REG(PWR->CR1);
HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFE);
