diff options
author | Yicheng Li <yichengli@chromium.org> | 2019-11-18 16:11:31 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-02-19 04:19:01 +0000 |
commit | 80ca9dfa347a9af16607992b995133d99a5cce48 (patch) | |
tree | a6c2b197818f9454e40ce945866433c2178ac332 /chip | |
parent | b11e6ca471c53cd9bd43e7d8a761b34f2b9fda91 (diff) | |
download | chrome-ec-80ca9dfa347a9af16607992b995133d99a5cce48.tar.gz |
chip/stm32: Add explanation for previous STOP mode bug.
Commit a6c2477aca71c0dd3aed21d34009aecf056a6f4a fixed a bug in STOP
mode. This commit adds more explanation of what was happening.
BUG=b:140538084
BRANCH=none
TEST=none
Change-Id: Ibfca1884aef4fabf8f74238b3ff1f70d5e0da3dd
Signed-off-by: Yicheng Li <yichengli@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1922912
Reviewed-by: Craig Hesling <hesling@chromium.org>
Diffstat (limited to 'chip')
-rw-r--r-- | chip/stm32/clock-stm32h7.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/chip/stm32/clock-stm32h7.c b/chip/stm32/clock-stm32h7.c index f41a76b87a..bd7cf65d3f 100644 --- a/chip/stm32/clock-stm32h7.c +++ b/chip/stm32/clock-stm32h7.c @@ -33,10 +33,9 @@ */ #define LPTIM_PRESCALER_LOG2 2 /* - * LPTIM_PRESCALER and LPTIM_PERIOD_US have to be signed, because we compare - * them to an int to decide whether to go to deep sleep. Simply using BIT() - * makes them unsigned, which causes a bug in deep sleep behavior. - * TODO(b/140538084): Explain exactly what the bug is. + * LPTIM_PRESCALER and LPTIM_PERIOD_US have to be signed, because they + * determine the signedness of the comparison with |next_delay| in + * __idle(), where |next_delay| is negative if no next event. */ #define LPTIM_PRESCALER ((int)BIT(LPTIM_PRESCALER_LOG2)) #define LPTIM_PERIOD_US (SECOND / (STM32_LSI_CLOCK / LPTIM_PRESCALER)) |