Problem with STM32F103C8T6 STANDBY mode
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).
