This is an automated email from the ASF dual-hosted git repository.

utzig pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
     new c2714c2  Allow timer for serial booting
c2714c2 is described below

commit c2714c236bcd2305ba3de8b7e8a6610eb221b5f8
Author: Fabio Utzig <[email protected]>
AuthorDate: Wed Jul 18 10:20:40 2018 -0300

    Allow timer for serial booting
---
 hw/bsp/stm32f4discovery/src/hal_bsp.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/hw/bsp/stm32f4discovery/src/hal_bsp.c 
b/hw/bsp/stm32f4discovery/src/hal_bsp.c
index af187a2..7e2075b 100644
--- a/hw/bsp/stm32f4discovery/src/hal_bsp.c
+++ b/hw/bsp/stm32f4discovery/src/hal_bsp.c
@@ -165,6 +165,11 @@ hal_bsp_init(void)
     hal_timer_init(2, TIM11);
 #endif
 
+#if (MYNEWT_VAL(OS_CPUTIME_TIMER_NUM) >= 0)
+    rc = os_cputime_init(MYNEWT_VAL(OS_CPUTIME_FREQ));
+    assert(rc == 0);
+#endif
+
 #if MYNEWT_VAL(SPI_0_MASTER)
     rc = hal_spi_init(0, &spi0_cfg, HAL_SPI_TYPE_MASTER);
     assert(rc == 0);

Reply via email to