You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ma...@apache.org on 2016/04/12 23:15:57 UTC

incubator-mynewt-core git commit: stm32f4xx; when entering sleep mode, JTAG detaches. Keep clocking debug portion even when CPU is sleeping or stopped.

Repository: incubator-mynewt-core
Updated Branches:
  refs/heads/develop fc78b273c -> 29509f4f0


stm32f4xx; when entering sleep mode, JTAG detaches. Keep clocking debug
portion even when CPU is sleeping or stopped.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/29509f4f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/29509f4f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/29509f4f

Branch: refs/heads/develop
Commit: 29509f4f091b8273578fe753aa3e6be89368f215
Parents: fc78b27
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Tue Apr 12 14:13:19 2016 -0700
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Tue Apr 12 14:14:40 2016 -0700

----------------------------------------------------------------------
 hw/mcu/stm/stm32f4xx/src/hal_os_tick.c | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/29509f4f/hw/mcu/stm/stm32f4xx/src/hal_os_tick.c
----------------------------------------------------------------------
diff --git a/hw/mcu/stm/stm32f4xx/src/hal_os_tick.c b/hw/mcu/stm/stm32f4xx/src/hal_os_tick.c
index 0f0ce77..92f5294 100644
--- a/hw/mcu/stm/stm32f4xx/src/hal_os_tick.c
+++ b/hw/mcu/stm/stm32f4xx/src/hal_os_tick.c
@@ -46,4 +46,10 @@ os_tick_init(uint32_t os_ticks_per_sec, int prio)
 
     /* Set the system tick priority */
     NVIC_SetPriority(SysTick_IRQn, prio);
+
+    /*
+     * Keep clocking debug even when CPU is sleeping, stopped or in standby.
+     */
+    DBGMCU->CR |= (DBGMCU_CR_DBG_SLEEP | DBGMCU_CR_DBG_STOP |
+      DBGMCU_CR_DBG_STANDBY);
 }