cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with STM32F103C8T6 STANDBY mode

Markiyan
Associate II

I am facing a realy strange problem while trying to put my stm32f103c8t6 into a standby mode. The consumption in standby mode is .8mA (what is 40 times higher then its supposed to be) on first board (Board A) and .02mA (what is 10 times higher) on second board (Board B). I spent 2 days already reading datasheet and reference manual and cannot get below .8mA.

(Board A) was modifyed by removing the on board voltage regulator and 2 LEDs. (Board B) has only the uC, 2 resistors (100k R3, R4).

The code I use is the following:

RCC->APB1ENR |= RCC_APB1ENR_PWREN;

ADC1->CR2 &= ~(1UL << 0);

ADC2->CR2 &= ~(1UL << 0);

SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;

PWR->CR |= PWR_CR_PDDS;

PWR->CR |= PWR_CR_CWUF;

PWR->CSR |= PWR_CSR_EWUP;

__WFI();

I am running at 8MHz (probably not so important in this case). I have already tried to put all pins into analog input mode (to disconnect the internal schmitt trigger).

4 REPLIES 4

Check your writes to PWR are actually occurring and that you don't need to unlock it.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

can you please explain me how to check?

Uwe Bonnes
Principal III

Run in the debugger and read out the registers you want to check. Compare with the values in the reference manual and check if they have the value you wnat them to have.

thanks for your reply. I am generating .bin file and uploading it via j-link. For some reason I cant run in debug mode via STM32CubeIDE.