i am new in stm32l0 i have configure ADC, RTC,LPTIMER and UART
count the external pulses in stop mode after 1 min wakeup from stop mode using ALARM send the data using uart to PC but i need help to enter the stop mode.
entering stop mode i have set
GPIO_InitStruct.Pin = GPIO_PIN_All;
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
GPIO_InitStruct.Pull = GPIO_NOPULL;
PWR->CR |= PWR_CR_CWUF; // clear the WUF flag after 2 clock cycles
PWR->CR &= ~( PWR_CR_PDDS ); // Enter stop mode when the CPU enters deepsleep
RCC->CFGR |= RCC_CFGR_STOPWUCK; // HSI16 oscillator is wake-up from stop clock
SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk; // low-power mode = stop mode
__WFI(); // enter low-power mode
this is doesn't work
after wake up lptimer also reinitialized or not?
before enter stop mode what i will do and after wakeup what will do?