Commit Graph

18 Commits (e0b4b51d92e9603551c60201719810e5a01469c9)

Author SHA1 Message Date
ccli8 ab7b93ca58 [Nuvoton] Synchronize us_ticker to lp_ticker
This is to make implementations of us_ticker/lp_ticker consistent.
2018-09-10 10:50:22 +08:00
ccli8 9ee83f575a [Nuvoton] Fix spurious us_ticker/lp_ticker interrupts
If us_ticker/lp_ticker is scheduled and then the interrupt is disabled, the originally scheduled
interrupt may still become pending. If this occurs, then an interrupt will fire twice on the next
call to us_ticker_set_interrupt/lp_ticker_set_interrupt - once immediately and then a second time
at the appropriate time.

This patch prevents the first interrupt by clearing interrupts in
us_ticker_set_interrupt/lp_ticker_set_interrupt before calling NVIC_EnableIRQ.
2018-09-10 10:50:21 +08:00
ccli8 4f04ae489e [Nuvoton] Synchronize lp_ticker code to us_ticker
This is to make us_ticker/lp_ticker code consistent.
2018-06-28 16:34:45 +08:00
ccli8 310a1fe318 [Nuvoton] Synchronize lp_ticker code to us_ticker
This is to make us_ticker/lp_ticker code consistent.
2018-06-26 13:47:30 +08:00
ccli8 fe627cb722 [Nuvoton] Synchronize lp_ticker code to us_ticker
This is to make us_ticker/lp_ticker code consistent.
2018-06-26 13:47:27 +08:00
ccli8 ebd93ba753 [Nuvoton] Meet new us_ticker HAL spec (Mbed OS 5.9)
1. Add USTICKER in device_has option of targets.json file.
2. Disable ticker interrupt in us_ticker_init
3. Add us_ticker_free
4. Enable interrupt in us_ticker_set_interrupt
2018-06-26 13:45:33 +08:00
ccli8 5d453ed381 [Nuvoton] Check timer active flag after enabling timer counting in us_ticker/lp_ticker 2018-03-26 09:42:53 +08:00
ccli8 1d7e7fd543 [NUC472/M453/M487/NANO130] Rework us_ticker and lp_ticker with one H/W timer
Originally, we use 2 H/W timers for us_ticker/lp_ticker, one for counting and the other for alarm.
With H/W timer running in continuous mode, we could use just one H/W timer for counting/alarm simultaneously.
2018-02-26 17:41:05 +08:00
ccli8 fae160fb9f [NUC472/M453/M487/NANO130] Rework us_ticker and lp_ticker
The rework includes the following:
1. Remove ticker overflow handling because upper layer (mbed_ticker_api.c) has done with it.
   This makes us_ticker/lp_ticker implementation more succinct and avoids potential error.
2. Refine timer register access with low-power clock source
2018-02-07 09:09:39 +08:00
ccli8 bc9c9ca1e2 [M487] Remove trailing space in lp_ticker/us_ticker 2017-11-22 08:55:58 +00:00
ccli8 8b86d44867 [M487] Fix premature lp_ticker interrupt
Old lp_ticker handles past event, but it has a bug with premature go-off.
The bug can re-produce on mbed-os-tests-mbed_drivers-lp_timeout/mbed-os-tests-mbed_hal-lp_us_tickers (mbed-os commit: 9c1fd48529).
Because upper layer (mbed-os/hal/mbed_ticker_api.c) has handled past event, this code can be removed from lp_ticker.

The similar fix also applies to us_ticker.
2017-11-22 08:55:58 +00:00
ccli8 0803267eab [M487] Add ticker API us_ticker_fire_interrupt and lp_ticker_fire_interrupt 2017-08-01 10:37:26 +08:00
ccli8 ed5ef0cc54 [M487] Refine coding style 2017-08-01 10:37:16 +08:00
ccli8 355b4336d6 [M487] Remove dead code 2017-08-01 10:32:43 +08:00
ccli8 7578541021 [M487] Fix some compile warnings 2017-08-01 10:23:47 +08:00
ccli8 acee0379c7 [M487] Remove power-down support from us_ticker 2017-08-01 10:19:19 +08:00
ccli8 ebe56466cc [M487] Fix us_ticker drift error > 5% 2017-08-01 10:19:14 +08:00
ccli8 98a79c872b [M487] Support NuMaker-PFM-M487 board 2017-08-01 10:14:24 +08:00