Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ target_sources(mbed-mimxrt105x
clock_config.c
PeripheralPins.c
pinmap.c
mimxrt_clock_adjustment.c
lpm.c
mbed_overrides.c

device/system_MIMXRT1052.c
Expand Down Expand Up @@ -106,6 +104,14 @@ target_sources(mbed-mimxrt105x
${STARTUP_FILE}
)

# Add extra sources used for deep sleep mode
if("DEVICE_LPTICKER=1" IN_LIST MBED_TARGET_DEFINITIONS)
target_sources(mbed-mimxrt105x
INTERFACE
mimxrt_clock_adjustment.c
lpm.c)
endif()

target_link_libraries(mbed-mimxrt105x
INTERFACE
mbed-mcuxpresso-mcus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,9 @@ void mbed_sdk_init()
BOARD_Init_PMIC_STBY_REQ();
#endif

#if DEVICE_LPTICKER
LPM_Init();
#endif
}

void spi_setup_clock()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ void hal_sleep(void)
__ISB();
}

#if DEVICE_LPTICKER
void hal_deepsleep(void)
{
/* Check if any of the UART's is transmitting data */
Expand All @@ -48,4 +49,9 @@ void hal_deepsleep(void)

vPortPOST_SLEEP_PROCESSING(kCLOCK_ModeStop);
}

#else
void hal_deepsleep(void)
{
hal_sleep();
}
#endif
3 changes: 1 addition & 2 deletions targets/targets.json5
Original file line number Diff line number Diff line change
Expand Up @@ -5226,8 +5226,7 @@
"SPISLAVE",
"TRNG",
"WATCHDOG",
"USBDEVICE",
"LPTICKER"
"USBDEVICE"
],
"overrides": {
"deep-sleep-latency": 10
Expand Down
Loading