File tree Expand file tree Collapse file tree 12 files changed +62
-69
lines changed Expand file tree Collapse file tree 12 files changed +62
-69
lines changed Original file line number Diff line number Diff line change 43
43
44
44
/* Includes ------------------------------------------------------------------*/
45
45
#include "stm32f0xx_hal_def.h"
46
+ #include "stm32f0xx_ll_rtc.h"
46
47
47
48
/** @addtogroup STM32F0xx_HAL_Driver
48
49
* @{
Original file line number Diff line number Diff line change 45
45
46
46
/* Includes ------------------------------------------------------------------*/
47
47
#include "stm32f2xx_hal_def.h"
48
+ #include "stm32f2xx_ll_rtc.h"
48
49
49
50
/** @addtogroup STM32F2xx_HAL_Driver
50
51
* @{
Original file line number Diff line number Diff line change 43
43
44
44
/* Includes ------------------------------------------------------------------*/
45
45
#include "stm32f3xx_hal_def.h"
46
+ #include "stm32f3xx_ll_rtc.h"
46
47
47
48
/** @addtogroup STM32F3xx_HAL_Driver
48
49
* @{
Original file line number Diff line number Diff line change 43
43
44
44
/* Includes ------------------------------------------------------------------*/
45
45
#include "stm32f4xx_hal_def.h"
46
+ #include "stm32f4xx_ll_rtc.h"
46
47
47
48
/** @addtogroup STM32F4xx_HAL_Driver
48
49
* @{
Original file line number Diff line number Diff line change 43
43
44
44
/* Includes ------------------------------------------------------------------*/
45
45
#include "stm32f7xx_hal_def.h"
46
+ #include "stm32f7xx_ll_rtc.h"
46
47
47
48
/** @addtogroup STM32F7xx_HAL_Driver
48
49
* @{
Original file line number Diff line number Diff line change 43
43
44
44
/* Includes ------------------------------------------------------------------*/
45
45
#include "stm32l0xx_hal_def.h"
46
+ #include "stm32l0xx_ll_rtc.h"
46
47
47
48
/** @addtogroup STM32L0xx_HAL_Driver
48
49
* @{
Original file line number Diff line number Diff line change 43
43
44
44
/* Includes ------------------------------------------------------------------*/
45
45
#include "stm32l1xx_hal_def.h"
46
+ #include "stm32l1xx_ll_rtc.h"
46
47
47
48
/** @addtogroup STM32L1xx_HAL_Driver
48
49
* @{
Original file line number Diff line number Diff line change 43
43
44
44
/* Includes ------------------------------------------------------------------*/
45
45
#include "stm32l4xx_hal_def.h"
46
+ #include "stm32l4xx_ll_rtc.h"
46
47
47
48
/** @addtogroup STM32L4xx_HAL_Driver
48
49
* @{
Original file line number Diff line number Diff line change @@ -139,10 +139,10 @@ void lp_ticker_init(void)
139
139
LptimHandle .Init .OutputPolarity = LPTIM_OUTPUTPOLARITY_HIGH ;
140
140
LptimHandle .Init .UpdateMode = LPTIM_UPDATE_IMMEDIATE ;
141
141
LptimHandle .Init .CounterSource = LPTIM_COUNTERSOURCE_INTERNAL ;
142
- #if ( TARGET_STM32L4 )
142
+ #if defined ( LPTIM_INPUT1SOURCE_GPIO ) /* STM32L4 */
143
143
LptimHandle .Init .Input1Source = LPTIM_INPUT1SOURCE_GPIO ;
144
144
LptimHandle .Init .Input2Source = LPTIM_INPUT2SOURCE_GPIO ;
145
- #endif /* TARGET_STM32L4 */
145
+ #endif /* LPTIM_INPUT1SOURCE_GPIO */
146
146
147
147
if (HAL_LPTIM_Init (& LptimHandle ) != HAL_OK ) {
148
148
error ("HAL_LPTIM_Init ERROR\n" );
@@ -151,7 +151,7 @@ void lp_ticker_init(void)
151
151
152
152
NVIC_SetVector (LPTIM1_IRQn , (uint32_t )LPTIM1_IRQHandler );
153
153
154
- #if !( TARGET_STM32L4 )
154
+ #if defined ( __HAL_LPTIM_WAKEUPTIMER_EXTI_ENABLE_IT )
155
155
/* EXTI lines are not configured by default */
156
156
__HAL_LPTIM_WAKEUPTIMER_EXTI_ENABLE_IT ();
157
157
__HAL_LPTIM_WAKEUPTIMER_EXTI_ENABLE_RISING_EDGE ();
@@ -190,7 +190,8 @@ static void LPTIM1_IRQHandler(void)
190
190
}
191
191
}
192
192
193
- #if !(TARGET_STM32L4 )
193
+ #if defined (__HAL_LPTIM_WAKEUPTIMER_EXTI_CLEAR_FLAG )
194
+ /* EXTI lines are not configured by default */
194
195
__HAL_LPTIM_WAKEUPTIMER_EXTI_CLEAR_FLAG ();
195
196
#endif
196
197
}
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ int mbed_sdk_inited = 0;
32
32
// This function is called after RAM initialization and before main.
33
33
void mbed_sdk_init ()
34
34
{
35
- #if TARGET_STM32F7
35
+ #if defined( __ICACHE_PRESENT ) /* STM32F7 */
36
36
// The mbed_sdk_init can be called either during cold boot or during
37
37
// application boot after bootloader has been executed.
38
38
// In case the bootloader has already enabled the cache,
@@ -43,7 +43,7 @@ void mbed_sdk_init()
43
43
if ((SCB -> CCR & (uint32_t )SCB_CCR_DC_Msk ) == 0 ) { // If DCache is disabled
44
44
SCB_EnableDCache ();
45
45
}
46
- #endif /* TARGET_STM32F7 */
46
+ #endif /* __ICACHE_PRESENT */
47
47
48
48
// Update the SystemCoreClock variable.
49
49
SystemCoreClockUpdate ();
You can’t perform that action at this time.
0 commit comments