mirror of https://github.com/ARMmbed/mbed-os.git
STM32 LPTICKER (LPTIM): correct init execution after bootloader
parent
f61dee1626
commit
0d620fe720
|
@ -59,16 +59,19 @@ const ticker_info_t *lp_ticker_get_info()
|
|||
|
||||
volatile uint8_t lp_Fired = 0;
|
||||
|
||||
static int LPTICKER_inited = 0;
|
||||
|
||||
static void LPTIM1_IRQHandler(void);
|
||||
static void (*irq_handler)(void);
|
||||
|
||||
void lp_ticker_init(void)
|
||||
{
|
||||
/* Check if LPTIM is already configured */
|
||||
if (__HAL_RCC_LPTIM1_IS_CLK_ENABLED()) {
|
||||
if (LPTICKER_inited) {
|
||||
lp_ticker_disable_interrupt();
|
||||
return;
|
||||
}
|
||||
LPTICKER_inited = 1;
|
||||
|
||||
RCC_PeriphCLKInitTypeDef RCC_PeriphCLKInitStruct = {0};
|
||||
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
|
||||
|
|
Loading…
Reference in New Issue