Skip to content

Commit

Permalink
Merge pull request ARMmbed#53 from linlingao/lp_ticker_bits
Browse files Browse the repository at this point in the history
Changed LP ticker count to 32 because the effective bitcount in Mbed …
  • Loading branch information
linlingao authored Aug 17, 2018
2 parents 3eb73c0 + 9304071 commit 4bd5967
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion TESTS/mbed_hal/lp_ticker/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ void lp_ticker_info_test()

TEST_ASSERT(p_ticker_info->frequency >= 4000);
TEST_ASSERT(p_ticker_info->frequency <= 64000);
TEST_ASSERT(p_ticker_info->bits >= 12);
TEST_ASSERT(p_ticker_info->bits >= 12 && p_ticker_info->bits <= 32);
}

#if DEVICE_SLEEP
Expand Down
5 changes: 3 additions & 2 deletions targets/TARGET_TI/TARGET_CC32XX/TARGET_CC3220SF/lp_ticker.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
#include "lp_ticker_api.h"
#include "mbed_critical.h"

#define RTC_BITS 48u
// There's actually 48b but Mbed OS supports 32b only.
#define RTC_BITS 32u
#define RTC_FREQ 32768u

static bool rtc_inited = false;
Expand All @@ -38,7 +39,7 @@ const ticker_info_t* lp_ticker_get_info()
{
static const ticker_info_t info = {
RTC_FREQ, // 32KHz
RTC_BITS // 48 bit counter
RTC_BITS // 32 bit counter
};
return &info;
}
Expand Down

0 comments on commit 4bd5967

Please sign in to comment.