Update sleep.c

pull/8815/head
ThunderSoft_mbed_os 2018-12-03 09:38:53 +08:00 committed by panyz0725@thundersoft.com
parent d883eb8f83
commit d421a165e4
1 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
/* mbed Microcontroller Library /* mbed Microcontroller Library
* (C)Copyright TOSHIBA ELECTRONIC DEVICES & STORAGE CORPORATION 2017 All rights reserved * (C)Copyright TOSHIBA ELECTRONIC DEVICES & STORAGE CORPORATION 2018 All rights reserved
* * SPDX-License-Identifier: Apache-2.0
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
@ -52,7 +52,7 @@ void hal_deepsleep(void)
tmp &= EXTERNEL_OSC_MASK; tmp &= EXTERNEL_OSC_MASK;
TSB_CG->OSCCR = tmp; TSB_CG->OSCCR = tmp;
TSB_CG_OSCCR_IHOSC2EN = DISABLE; //Stop IHOSC2 of OFD TSB_CG_OSCCR_IHOSC2EN = DISABLE; //Stop IHOSC2 of OFD
// Wait for status of OFD until off ”0” // Wait for status of OFD until off ”0”
while(TSB_CG_OSCCR_IHOSC2F); while(TSB_CG_OSCCR_IHOSC2F);
__DSB(); // Enter STOP1 mode __DSB(); // Enter STOP1 mode
__WFI(); __WFI();