cancel
Showing results for 
Search instead for 
Did you mean: 

How to put only D2 in standby in stm32h7?

AAnci.1
Associate II

Hello, for a project i'm designing i need to perform complex dsp operations in real time while minimizing power consumption (hence why i chose an h7 instead of an f7 mcu). From the cubeMx power estimation tool i saw that this mcu should be able to reach about 35mA at 200MHz when the D2 domain is in standby mode (i dont need the domain most of the time during computation), but i have found nowhere informations about how to put a single domain in standby mode. Do you know of any examples/ documentation that can guide me though the process?

Many thanks

1 REPLY 1
berendi
Principal

D2Standby is entered when the PWR_CPUCR_PDDS_D2 bit is set, and either the CPU goes into stop mode (which you do not want) or all peripherals in the D2 domain are stopped in the RCC peripheral enable registers. See the details in the PWR and RCC chapters of the reference manual.

PWR->CPUCR |= PWR_CPUCR_PDDS_D2;
uint32_t cpucr1 = PWR->CPUCR; // before
RCC->APB1LENR = 0;
RCC->APB1HENR = 0;
RCC->APB2ENR = 0;
RCC->AHB1ENR = 0;
RCC->AHB1ENR = 0;
RCC->AHB2ENR = 0;
uint32_t cpucr2 = PWR->CPUCR; // after

Bit 8 of PWR->CPUCR, i.e. PWR_CPUCR_SBF_D2 will be set at the end, indicating that the D2 domain has entered standby mode.