Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NRF_52840: Fix us ticker counter size #7313

Merged
merged 1 commit into from
Jun 29, 2018

Conversation

mprse
Copy link
Contributor

@mprse mprse commented Jun 25, 2018

Description

It has been noticed that there is a problem with us ticker on NRF_52840 board after 32 bit counter has been used for us ticker on NRF52 family boards.

Currently NRF52 symbol is defined only for MCU_NRF52832 (not for MCU_NRF52840) and based on this symbol 16 or 32 bit counter is selected (16 bit for NRF51 family and 32 for NRF52 family).
Since MCU_NRF52840 defines NRF52840_XXAA and provides 32 bit counters, 32 bit counter should be selected also when NRF52840_XXAA symbol is defined.

@marcuschangarm Can you review this PR?

Pull request type

[X] Fix
[ ] Refactor
[ ] New target
[ ] Feature
[ ] Breaking change

@mprse
Copy link
Contributor Author

mprse commented Jun 25, 2018

Ticker/Timer test results (GCC_ARM/NRF52840_DK):

+---------------------+---------------+-------------------------------------+----------------------------------------------------------------+--------+--------+--------+--------------------+
| target              | platform_name | test suite                          | test case                                                      | passed | failed | result | elapsed_time (sec) |
+---------------------+---------------+-------------------------------------+----------------------------------------------------------------+--------+--------+--------+--------------------+
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_drivers-lp_ticker        | Test attach for 0.001s and time measure                        | 1      | 0      | OK     | 0.07               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_drivers-lp_ticker        | Test attach for 0.01s and time measure                         | 1      | 0      | OK     | 0.07               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_drivers-lp_ticker        | Test attach for 0.1s and time measure                          | 1      | 0      | OK     | 0.16               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_drivers-lp_ticker        | Test attach for 0.5s and time measure                          | 1      | 0      | OK     | 0.57               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_drivers-lp_ticker        | Test attach_us for 100ms and time measure                      | 1      | 0      | OK     | 0.18               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_drivers-lp_ticker        | Test attach_us for 10ms and time measure                       | 1      | 0      | OK     | 0.08               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_drivers-lp_ticker        | Test attach_us for 1ms and time measure                        | 1      | 0      | OK     | 0.08               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_drivers-lp_ticker        | Test attach_us for 500ms and time measure                      | 1      | 0      | OK     | 0.57               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_drivers-lp_ticker        | Test detach                                                    | 1      | 0      | OK     | 0.74               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_drivers-lp_ticker        | Test multi call and time measure                               | 1      | 0      | OK     | 1.06               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_drivers-lp_ticker        | Test multi ticker                                              | 1      | 0      | OK     | 0.28               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_drivers-lp_timer         | Test: LowPowerTimer - float operator.                          | 1      | 0      | OK     | 0.08               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_drivers-lp_timer         | Test: LowPowerTimer - measure time accumulation.               | 1      | 0      | OK     | 1.25               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_drivers-lp_timer         | Test: LowPowerTimer - reset.                                   | 1      | 0      | OK     | 0.09               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_drivers-lp_timer         | Test: LowPowerTimer - start started timer.                     | 1      | 0      | OK     | 0.1                |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_drivers-lp_timer         | Test: LowPowerTimer - stopped after creation.                  | 1      | 0      | OK     | 0.09               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_drivers-lp_timer         | Test: LowPowerTimer - time measurement 1 ms.                   | 1      | 0      | OK     | 0.07               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_drivers-lp_timer         | Test: LowPowerTimer - time measurement 1 s.                    | 1      | 0      | OK     | 1.08               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_drivers-lp_timer         | Test: LowPowerTimer - time measurement 10 ms.                  | 1      | 0      | OK     | 0.08               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_drivers-lp_timer         | Test: LowPowerTimer - time measurement 100 ms.                 | 1      | 0      | OK     | 0.17               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_drivers-timer            | Test: Timer (based on os ticker) - float operator.             | 1      | 0      | OK     | 0.1                |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_drivers-timer            | Test: Timer (based on os ticker) - measured time accumulation. | 1      | 0      | OK     | 1.26               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_drivers-timer            | Test: Timer (based on os ticker) - reset.                      | 1      | 0      | OK     | 0.09               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_drivers-timer            | Test: Timer (based on os ticker) - start started timer.        | 1      | 0      | OK     | 0.11               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_drivers-timer            | Test: Timer (based on os ticker) is stopped after creation.    | 1      | 0      | OK     | 0.1                |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_drivers-timer            | Test: Timer (based on user ticker) - float operator.           | 1      | 0      | OK     | 0.08               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_drivers-timer            | Test: Timer (based on user ticker) - reset.                    | 1      | 0      | OK     | 0.07               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_drivers-timer            | Test: Timer (based on user ticker) - start started timer.      | 1      | 0      | OK     | 0.09               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_drivers-timer            | Test: Timer (based on user ticker) is stopped after creation.  | 1      | 0      | OK     | 0.1                |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_drivers-timer            | Test: Timer (based on user ticker) measured time accumulation. | 1      | 0      | OK     | 0.09               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_drivers-timer            | Test: Timer - time measurement 1 ms.                           | 1      | 0      | OK     | 0.07               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_drivers-timer            | Test: Timer - time measurement 1 s.                            | 1      | 0      | OK     | 1.07               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_drivers-timer            | Test: Timer - time measurement 10 ms.                          | 1      | 0      | OK     | 0.07               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_drivers-timer            | Test: Timer - time measurement 100 ms.                         | 1      | 0      | OK     | 0.18               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_drivers-timerevent       | Test insert                                                    | 1      | 0      | OK     | 0.1                |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_drivers-timerevent       | Test insert timestamp from the past                            | 1      | 0      | OK     | 0.06               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_drivers-timerevent       | Test insert_absolute                                           | 1      | 0      | OK     | 0.11               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_drivers-timerevent       | Test insert_absolute timestamp from the past                   | 1      | 0      | OK     | 0.07               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_drivers-timerevent       | Test insert_absolute zero                                      | 1      | 0      | OK     | 0.05               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_drivers-timerevent       | Test remove after insert                                       | 1      | 0      | OK     | 0.21               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_drivers-timerevent       | Test remove after insert_absolute                              | 1      | 0      | OK     | 0.22               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-common_tickers       | Microsecond ticker fire interrupt                              | 1      | 0      | OK     | 0.08               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-common_tickers       | Microsecond ticker increment test                              | 1      | 0      | OK     | 0.12               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-common_tickers       | Microsecond ticker info test                                   | 1      | 0      | OK     | 0.05               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-common_tickers       | Microsecond ticker init is safe to call repeatedly             | 1      | 0      | OK     | 0.09               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-common_tickers       | Microsecond ticker interrupt test                              | 1      | 0      | OK     | 0.08               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-common_tickers       | Microsecond ticker overflow test                               | 1      | 0      | OK     | 0.09               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-common_tickers       | Microsecond ticker past interrupt test                         | 1      | 0      | OK     | 0.07               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-common_tickers       | Microsecond ticker reschedule test                             | 1      | 0      | OK     | 0.06               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-common_tickers       | Microsecond ticker speed test                                  | 1      | 0      | OK     | 0.07               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-common_tickers       | lp ticker fire interrupt                                       | 1      | 0      | OK     | 0.06               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-common_tickers       | lp ticker increment test                                       | 1      | 0      | OK     | 0.05               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-common_tickers       | lp ticker info test                                            | 1      | 0      | OK     | 0.06               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-common_tickers       | lp ticker init is safe to call repeatedly                      | 1      | 0      | OK     | 0.1                |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-common_tickers       | lp ticker interrupt test                                       | 1      | 0      | OK     | 0.13               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-common_tickers       | lp ticker overflow test                                        | 1      | 0      | OK     | 0.08               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-common_tickers       | lp ticker past interrupt test                                  | 1      | 0      | OK     | 0.06               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-common_tickers       | lp ticker reschedule test                                      | 1      | 0      | OK     | 0.1                |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-common_tickers       | lp ticker speed test                                           | 1      | 0      | OK     | 0.06               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-common_tickers_freq  | Low power ticker frequency test                                | 1      | 0      | OK     | 10.21              |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-common_tickers_freq  | Microsecond ticker frequency test                              | 1      | 0      | OK     | 10.15              |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-lp_ticker            | lp ticker glitch test                                          | 1      | 0      | OK     | 0.08               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-lp_ticker            | lp ticker info test                                            | 1      | 0      | OK     | 0.04               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-lp_ticker            | lp ticker sleep test                                           | 1      | 0      | OK     | 0.11               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-ticker               | legacy insert event head                                       | 1      | 0      | OK     | 0.05               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-ticker               | legacy insert event in overflow range                          | 1      | 0      | OK     | 0.06               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-ticker               | legacy insert event multiple overflow                          | 1      | 0      | OK     | 0.06               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-ticker               | legacy insert event outside overflow range                     | 1      | 0      | OK     | 0.07               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-ticker               | legacy insert event overflow                                   | 1      | 0      | OK     | 0.05               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-ticker               | legacy insert event tail                                       | 1      | 0      | OK     | 0.05               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-ticker               | test_frequencies_and_masks                                     | 1      | 0      | OK     | 1.95               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-ticker               | test_insert_event_us_head                                      | 1      | 0      | OK     | 0.05               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-ticker               | test_insert_event_us_in_overflow_range                         | 1      | 0      | OK     | 0.08               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-ticker               | test_insert_event_us_multiple_random                           | 1      | 0      | OK     | 0.06               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-ticker               | test_insert_event_us_outside_overflow_range                    | 1      | 0      | OK     | 0.07               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-ticker               | test_insert_event_us_tail                                      | 1      | 0      | OK     | 0.06               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-ticker               | test_insert_event_us_underflow                                 | 1      | 0      | OK     | 0.06               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-ticker               | test_irq_handler_insert_immediate_in_irq                       | 1      | 0      | OK     | 0.07               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-ticker               | test_irq_handler_insert_non_immediate_in_irq                   | 1      | 0      | OK     | 0.07               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-ticker               | test_irq_handler_multiple_event_multiple_dequeue               | 1      | 0      | OK     | 0.09               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-ticker               | test_irq_handler_multiple_event_single_dequeue                 | 1      | 0      | OK     | 0.08               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-ticker               | test_irq_handler_multiple_event_single_dequeue_overflow        | 1      | 0      | OK     | 0.08               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-ticker               | test_irq_handler_single_event                                  | 1      | 0      | OK     | 0.07               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-ticker               | test_irq_handler_single_event_spurious                         | 1      | 0      | OK     | 0.08               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-ticker               | test_legacy_insert_event_multiple_random                       | 1      | 0      | OK     | 0.07               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-ticker               | test_match_interval_passed                                     | 1      | 0      | OK     | 0.06               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-ticker               | test_match_interval_passed_table                               | 1      | 0      | OK     | 0.06               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-ticker               | test_remove_event_head                                         | 1      | 0      | OK     | 0.05               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-ticker               | test_remove_event_invalid                                      | 1      | 0      | OK     | 0.07               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-ticker               | test_remove_event_tail                                         | 1      | 0      | OK     | 0.05               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-ticker               | test_remove_random                                             | 1      | 0      | OK     | 0.04               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-ticker               | test_set_interrupt_past_time                                   | 1      | 0      | OK     | 0.05               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-ticker               | test_set_interrupt_past_time_with_delay                        | 1      | 0      | OK     | 0.06               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-ticker               | test_ticker_max_value                                          | 1      | 0      | OK     | 0.05               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-ticker               | ticker initialization                                          | 1      | 0      | OK     | 0.05               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-ticker               | ticker multiple initialization                                 | 1      | 0      | OK     | 0.06               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-ticker               | ticker read                                                    | 1      | 0      | OK     | 0.04               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-ticker               | ticker read overflow                                           | 1      | 0      | OK     | 0.04               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-ticker               | update overflow guard                                          | 1      | 0      | OK     | 0.05               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-ticker               | update overflow guard in case of spurious interrupt            | 1      | 0      | OK     | 0.08               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal-us_ticker            | us ticker info test                                            | 1      | 0      | OK     | 0.05               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbedmicro-rtos-mbed-rtostimer | Calls from ISR fail                                            | 1      | 0      | OK     | 0.1                |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbedmicro-rtos-mbed-rtostimer | One-shot not restarted when elapsed                            | 1      | 0      | OK     | 0.18               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbedmicro-rtos-mbed-rtostimer | Periodic repeats continuously                                  | 1      | 0      | OK     | 0.21               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbedmicro-rtos-mbed-rtostimer | Restart changes timeout                                        | 1      | 0      | OK     | 0.08               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbedmicro-rtos-mbed-rtostimer | Stopped timer can be started again                             | 1      | 0      | OK     | 0.16               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbedmicro-rtos-mbed-rtostimer | Timer can be stopped                                           | 1      | 0      | OK     | 0.11               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbedmicro-rtos-mbed-rtostimer | Timer is created in stopped state                              | 1      | 0      | OK     | 0.07               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbedmicro-rtos-mbed-rtostimer | Timer started with infinite delay                              | 1      | 0      | OK     | 0.06               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbedmicro-rtos-mbed-rtostimer | Timer started with zero delay                                  | 1      | 0      | OK     | 0.06               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbedmicro-rtos-mbed-systimer  | Handler called once                                            | 1      | 0      | OK     | 0.13               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbedmicro-rtos-mbed-systimer  | Schedule zero ticks                                            | 1      | 0      | OK     | 0.04               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbedmicro-rtos-mbed-systimer  | Tick can be cancelled                                          | 1      | 0      | OK     | 0.09               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbedmicro-rtos-mbed-systimer  | Tick count is updated correctly                                | 1      | 0      | OK     | 0.05               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbedmicro-rtos-mbed-systimer  | Tick count is zero upon creation                               | 1      | 0      | OK     | 0.05               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbedmicro-rtos-mbed-systimer  | Time is updated correctly                                      | 1      | 0      | OK     | 0.05               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbedmicro-rtos-mbed-systimer  | Wake up from deep sleep                                        | 1      | 0      | OK     | 0.11               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbedmicro-rtos-mbed-systimer  | Wake up from sleep                                             | 1      | 0      | OK     | 0.09               |
+---------------------+---------------+-------------------------------------+----------------------------------------------------------------+--------+--------+--------+--------------------+

0xc0170
0xc0170 previously approved these changes Jun 25, 2018
@@ -77,7 +77,7 @@ void us_ticker_init(void)

nrf_timer_frequency_set(NRF_TIMER1, NRF_TIMER_FREQ_1MHz);

#ifdef NRF52
#if defined(NRF52) || defined(NRF52840_XXAA)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you use TARGET_NRF52 it will also work for the new NRF52810.

@mprse
Copy link
Contributor Author

mprse commented Jun 26, 2018

Fixed as suggested by @marcuschangarm.
Thanks!

@maciejbocianski maciejbocianski mentioned this pull request Jun 26, 2018
It has been noticed that there is a problem with us ticker on NRF_52840 board after 32 bit counter has been used for us ticker on NRF52 family boards.
Currently NRF52 symbol is defined only for MCU_NRF52832 (not for MCU_NRF52840) and based on this symbol 16 or 32 bit counter is selected (16 bit for NRF51 family and 32 for NRF52 family).
Since MCU_NRF52840 defines NRF52840_XXAA and provides 32 bit counters, 32 bit counter should be selected also when NRF52840_XXAA symbol is defined.
@mprse mprse force-pushed the NRF52840_ticker_width_fix branch from 94cd20b to 9966110 Compare June 27, 2018 13:33
@0xc0170
Copy link
Contributor

0xc0170 commented Jun 28, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Jun 28, 2018

Build : SUCCESS

Build number : 2467
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/7313/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented Jun 28, 2018

@mbed-ci
Copy link

mbed-ci commented Jun 28, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants