From 1350e0b0c9c32d072cc9edfd93d7ed1501a366f1 Mon Sep 17 00:00:00 2001 From: Przemyslaw Stekiel Date: Mon, 5 Aug 2019 10:47:40 +0200 Subject: [PATCH 1/2] Relax us ticker frequency requirement. This change is required by the Samsung S111(S5JS100). On this board timer clock used for us ticker operates at 26MHz. According to current requirements, 8 MHz is the top limit for us ticker timer. This change relaxes top limit to 100 MHz, but only for 32-bit timers. --- docs/porting/target/us_ticker.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/porting/target/us_ticker.md b/docs/porting/target/us_ticker.md index 62e28b781c..592a9a3db4 100644 --- a/docs/porting/target/us_ticker.md +++ b/docs/porting/target/us_ticker.md @@ -6,7 +6,8 @@ Implementing the microsecond ticker enables Mbed OS to perform operations that r #### Defined behavior -- Has a reported frequency between 250KHz and 8MHz. +- Has a reported frequency between 250KHz and 8MHz for counters which are less than 32 bits wide. +- Has a reported frequency up to 100MHz for counters which are 32 bits wide. - Has a counter that is at least 16 bits wide. - The function `ticker_init` is safe to call repeatedly. - The function `ticker_init` allows the ticker to keep counting and disables the ticker interrupt. From 7bcac4de0e3beffa429f6d305d2cb9932b997163 Mon Sep 17 00:00:00 2001 From: Amanda Butler Date: Tue, 6 Aug 2019 08:47:21 -0500 Subject: [PATCH 2/2] Edit us_ticker.md Edit file for formatting and precise language. --- docs/porting/target/us_ticker.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/porting/target/us_ticker.md b/docs/porting/target/us_ticker.md index 592a9a3db4..587644ad92 100644 --- a/docs/porting/target/us_ticker.md +++ b/docs/porting/target/us_ticker.md @@ -6,8 +6,8 @@ Implementing the microsecond ticker enables Mbed OS to perform operations that r #### Defined behavior -- Has a reported frequency between 250KHz and 8MHz for counters which are less than 32 bits wide. -- Has a reported frequency up to 100MHz for counters which are 32 bits wide. +- Has a reported frequency between 250 KHz and 8 MHz for counters that are less than 32 bits wide. +- Has a reported frequency up to 100 MHz for counters that are 32 bits wide. - Has a counter that is at least 16 bits wide. - The function `ticker_init` is safe to call repeatedly. - The function `ticker_init` allows the ticker to keep counting and disables the ticker interrupt. @@ -18,7 +18,7 @@ Implementing the microsecond ticker enables Mbed OS to perform operations that r - The ticker interrupt fires only when the ticker time increments to or past the value set by `ticker_set_interrupt`. - It is safe to call `ticker_set_interrupt` repeatedly before the handler is called. - The function `ticker_fire_interrupt` causes `ticker_irq_handler` to be called immediately from interrupt context. -- The ticker operations `ticker_read`, `ticker_clear_interrupt`, `ticker_set_interrupt` and `ticker_fire_interrupt` take less than 20us to complete. +- The ticker operations `ticker_read`, `ticker_clear_interrupt`, `ticker_set_interrupt` and `ticker_fire_interrupt` take less than 20 us to complete. #### Undefined behavior @@ -31,19 +31,19 @@ Implementing the microsecond ticker enables Mbed OS to perform operations that r Be careful around these common trouble areas when implementing this API: -- The ticker cannot drift when rescheduled repeatedly -- The ticker keeps counting when it rolls over -- The ticker interrupt fires when the compare value is set to 0 and overflow occurs +- The ticker cannot drift when rescheduled repeatedly. +- The ticker keeps counting when it rolls over. +- The ticker interrupt fires when the compare value is set to 0 and overflow occurs. ### Dependencies -To implement this API, the device must have a hardware counter that has a count value at least 16 bits wide and can operate between 250KHz and 8MHz. +To implement this API, the device must have a hardware counter that has a count value at least 16 bits wide and can operate between 250 KHz and 8 MHz. ### Implementing the microsecond ticker API You can find the API and specification for the microsecond ticker API in the following header file: -[![View code](https://www.mbed.com/embed/?type=library)](http://os-doc-builder.test.mbed.com/docs/development/mbed-os-api-doxy/group__hal__us__ticker.html) +[![View code](https://www.mbed.com/embed/?type=library)](http://os.mbed.com/docs/development/mbed-os-api-doxy/group__hal__us__ticker.html) To enable microsecond ticker support in Mbed OS, add the `USTICKER` label in the `device_has` option of the target's section in the `targets.json` file. @@ -57,8 +57,8 @@ mbed test -t -m -n tests-mbed_hal-common_ticker*,tests-mbed You can read more about the test cases: - [![View code](https://www.mbed.com/embed/?type=library)](http://os-doc-builder.test.mbed.com/docs/development/mbed-os-api-doxy/group__hal__us__ticker.html) + [![View code](https://www.mbed.com/embed/?type=library)](http://os.mbed.com/docs/development/mbed-os-api-doxy/group__hal__us__ticker.html) - [![View code](https://www.mbed.com/embed/?type=library)](http://os-doc-builder.test.mbed.com/docs/development/mbed-os-api-doxy/group__hal__ticker__tests.html) + [![View code](https://www.mbed.com/embed/?type=library)](http://os.mbed.com/docs/development/mbed-os-api-doxy/group__hal__ticker__tests.html) - [![View code](https://www.mbed.com/embed/?type=library)](http://os-doc-builder.test.mbed.com/docs/development/mbed-os-api-doxy/group__hal__us__ticker__tests.html) + [![View code](https://www.mbed.com/embed/?type=library)](http://os.mbed.com/docs/development/mbed-os-api-doxy/group__hal__us__ticker__tests.html)