Skip to content

Commit

Permalink
hw/mcu/dialog: Move lpclk enable to lpclk sysinit
Browse files Browse the repository at this point in the history
In case RCX is enabled, we call lpclk enable from sysinit instead of
system init.
  • Loading branch information
andrzej-kaczmarek committed Aug 9, 2023
1 parent 3866201 commit c8596c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 4 additions & 0 deletions hw/mcu/dialog/da1469x/src/da1469x_lpclk.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ da1469x_lpclk_updated(void)
void
da1469x_lpclk_init(void)
{
#if MYNEWT_VAL_CHOICE(MCU_LPCLK_SOURCE, RCX)
da1469x_lpclk_enabled();
#endif

#if MYNEWT_VAL_CHOICE(MCU_LPCLK_SOURCE, XTAL32K)
static struct hal_timer lpclk_settle_tmr;
da1469x_clock_lp_xtal32k_enable();
Expand Down
1 change: 0 additions & 1 deletion hw/mcu/dialog/da1469x/src/hal_system.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ hal_system_clock_start(void)
da1469x_clock_lp_rcx_enable();
da1469x_clock_lp_rcx_switch();
da1469x_clock_lp_rcx_calibrate();
da1469x_lpclk_enabled();
#else
/*
* We cannot switch lp_clk to XTAL32K here since it needs some time to
Expand Down

0 comments on commit c8596c3

Please sign in to comment.