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

cpu/nrf5x_common: implement periph_timer_query_freqs #20145

Merged
merged 1 commit into from
Dec 9, 2023

Conversation

maribu
Copy link
Member

@maribu maribu commented Dec 5, 2023

Contribution description

As the title says.

Testing procedure

Run the test provided by #16349.

Issues/PRs references

Depends on #16349 and includes the first commit of it.

@maribu maribu added Type: new feature The issue requests / The PR implemements a new feature for RIOT State: waiting for other PR State: The PR requires another PR to be merged first CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Dec 5, 2023
@github-actions github-actions bot added Platform: ARM Platform: This PR/issue effects ARM-based platforms Area: build system Area: Build system Area: drivers Area: Device drivers Area: cpu Area: CPU/MCU ports Area: Kconfig Area: Kconfig integration labels Dec 5, 2023
@maribu maribu removed the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Dec 5, 2023
@maribu maribu force-pushed the periph_timer_query_freq-nrf5x branch from 7a977cb to 76baa78 Compare December 5, 2023 20:56
@maribu maribu added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed State: waiting for other PR State: The PR requires another PR to be merged first labels Dec 5, 2023
@github-actions github-actions bot added State: waiting for other PR State: The PR requires another PR to be merged first and removed Area: build system Area: Build system Area: drivers Area: Device drivers CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Dec 5, 2023
@maribu maribu added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed State: waiting for other PR State: The PR requires another PR to be merged first labels Dec 5, 2023
@maribu maribu changed the title cpu/nrf5x_common: implement periph_timer_query_freq cpu/nrf5x_common: implement periph_timer_query_freqs Dec 5, 2023
@riot-ci
Copy link

riot-ci commented Dec 5, 2023

Murdock results

✔️ PASSED

b40ab8f cpu/nrf5x_common: implement periph_timer_query_freqs

Success Failures Total Runtime
8082 0 8082 11m:52s

Artifacts

@maribu maribu force-pushed the periph_timer_query_freq-nrf5x branch from 76baa78 to 3f32a1a Compare December 7, 2023 15:17
@maribu
Copy link
Member Author

maribu commented Dec 7, 2023

make BOARD=nrf52dk -C tests/periph/timer flash test -j
make: Entering directory '/home/maribu/Repos/software/RIOT/master/tests/periph/timer'
"make" -C /home/maribu/Repos/software/RIOT/master/pkg/cmsis/ 
Building application "tests_timer" for "nrf52dk" with MCU "nrf52".

"make" -C /home/maribu/Repos/software/RIOT/master/boards/common/init
"make" -C /home/maribu/Repos/software/RIOT/master/boards/nrf52dk
"make" -C /home/maribu/Repos/software/RIOT/master/core
"make" -C /home/maribu/Repos/software/RIOT/master/core/lib
"make" -C /home/maribu/Repos/software/RIOT/master/cpu/nrf52
"make" -C /home/maribu/Repos/software/RIOT/master/drivers
"make" -C /home/maribu/Repos/software/RIOT/master/sys
"make" -C /home/maribu/Repos/software/RIOT/master/boards/common/nrf52xxxdk
"make" -C /home/maribu/Repos/software/RIOT/master/cpu/cortexm_common
"make" -C /home/maribu/Repos/software/RIOT/master/cpu/nrf52/periph
"make" -C /home/maribu/Repos/software/RIOT/master/cpu/nrf52/vectors
"make" -C /home/maribu/Repos/software/RIOT/master/cpu/nrf5x_common
"make" -C /home/maribu/Repos/software/RIOT/master/drivers/periph_common
"make" -C /home/maribu/Repos/software/RIOT/master/sys/auto_init
"make" -C /home/maribu/Repos/software/RIOT/master/cpu/cortexm_common/periph
"make" -C /home/maribu/Repos/software/RIOT/master/sys/div
"make" -C /home/maribu/Repos/software/RIOT/master/cpu/nrf5x_common/periph
"make" -C /home/maribu/Repos/software/RIOT/master/sys/isrpipe
"make" -C /home/maribu/Repos/software/RIOT/master/sys/libc
"make" -C /home/maribu/Repos/software/RIOT/master/sys/malloc_thread_safe
"make" -C /home/maribu/Repos/software/RIOT/master/sys/newlib_syscalls_default
"make" -C /home/maribu/Repos/software/RIOT/master/sys/preprocessor
"make" -C /home/maribu/Repos/software/RIOT/master/sys/stdio_uart
"make" -C /home/maribu/Repos/software/RIOT/master/sys/test_utils/interactive_sync
"make" -C /home/maribu/Repos/software/RIOT/master/sys/test_utils/print_stack_usage
"make" -C /home/maribu/Repos/software/RIOT/master/sys/tsrb
   text	  data	   bss	   dec	   hex	filename
  12884	   120	  2792	 15796	  3db4	/home/maribu/Repos/software/RIOT/master/tests/periph/timer/bin/nrf52dk/tests_timer.elf
/home/maribu/Repos/software/RIOT/master/dist/tools/openocd/openocd.sh flash /home/maribu/Repos/software/RIOT/master/tests/periph/timer/bin/nrf52dk/tests_timer.elf
### Flashing Target ###
Open On-Chip Debugger 0.12.0+dev-snapshot (2023-06-12-09:31)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
swd
Info : J-Link OB-SAM3U128-V2-NordicSemi compiled Mar 17 2020 14:43:00
Info : Hardware version: 1.00
Info : VTarget = 3.300 V
Info : clock speed 1000 kHz
Info : SWD DPIDR 0x2ba01477
Info : [nrf52.cpu] Cortex-M4 r0p1 processor detected
Info : [nrf52.cpu] target has 6 breakpoints, 4 watchpoints
Info : starting gdb server for nrf52.cpu on 0
Info : Listening on port 34153 for gdb connections
    TargetName         Type       Endian TapName            State       
--  ------------------ ---------- ------ ------------------ ------------
 0* nrf52.cpu          cortex_m   little nrf52.cpu          unknown
[nrf52.cpu] halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x00000e74 msp: 0x20000200
Info : nRF52832-QFAA(build code: B0) 512kB Flash, 64kB RAM
Warn : Adding extra erase range, 0x000032cc .. 0x00003fff
auto erase enabled
wrote 13004 bytes from file /home/maribu/Repos/software/RIOT/master/tests/periph/timer/bin/nrf52dk/tests_timer.elf in 0.388569s (32.682 KiB/s)
verified 13004 bytes in 0.065470s (193.970 KiB/s)
shutdown command invoked
Done flashing
r
/home/maribu/Repos/software/RIOT/master/dist/tools/pyterm/pyterm -p "/dev/ttyACM1" -b "115200" --no-reconnect --noprefix --no-repeat-command-on-empty-line 
Connect to serial port /dev/ttyACM1
Welcome to pyterm!
Type '/exit' to exit.
READY
s
START
main(): This is RIOT! (Version: 2023.10-devel-690-g3f32a-periph_timer_query_freq-nrf5x)

Test for peripheral TIMERs

Available timers: 4

TIMER 0
=======

  - supported frequencies:
    0: 16000000
    1: 8000000
    2: 4000000
    ....
    9: 31250
  - Calling timer_init(0, 16000000)
    initialization successful
  - timer_stop(0): stopped
  - timer_set(0, 0, 80000)
    Successfully set timeout 80000 for channel 0
  - timer_set(0, 1, 160000)
    Successfully set timeout 160000 for channel 1
  - timer_set(0, 2, 240000)
    Successfully set timeout 240000 for channel 2
  - timer_start(0)
  - Results:
    - channel 0 fired at SW count    16000      - init:    16000
    - channel 1 fired at SW count    31988      - diff:    15988
    - channel 2 fired at SW count    47977      - diff:    15989
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)
  - Calling timer_init(0, 8000000)
    initialization successful
  - timer_stop(0): stopped
  - timer_set(0, 0, 40000)
    Successfully set timeout 40000 for channel 0
  - timer_set(0, 1, 80000)
    Successfully set timeout 80000 for channel 1
  - timer_set(0, 2, 120000)
    Successfully set timeout 120000 for channel 2
  - timer_start(0)
  - Results:
    - channel 0 fired at SW count    16000      - init:    16000
    - channel 1 fired at SW count    31988      - diff:    15988
    - channel 2 fired at SW count    47977      - diff:    15989
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)
  - Calling timer_init(0, 4000000)
    initialization successful
  - timer_stop(0): stopped
  - timer_set(0, 0, 20000)
    Successfully set timeout 20000 for channel 0
  - timer_set(0, 1, 40000)
    Successfully set timeout 40000 for channel 1
  - timer_set(0, 2, 60000)
    Successfully set timeout 60000 for channel 2
  - timer_start(0)
  - Results:
    - channel 0 fired at SW count    16000      - init:    16000
    - channel 1 fired at SW count    31988      - diff:    15988
    - channel 2 fired at SW count    47977      - diff:    15989
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)

TIMER 1
=======

  - supported frequencies:
    0: 16000000
    1: 8000000
    2: 4000000
    ....
    9: 31250
  - Calling timer_init(1, 16000000)
    initialization successful
  - timer_stop(1): stopped
  - timer_set(1, 0, 80000)
    Successfully set timeout 80000 for channel 0
  - timer_set(1, 1, 160000)
    Successfully set timeout 160000 for channel 1
  - timer_set(1, 2, 240000)
    Successfully set timeout 240000 for channel 2
  - timer_start(1)
  - Results:
    - channel 0 fired at SW count    16000      - init:    16000
    - channel 1 fired at SW count    31988      - diff:    15988
    - channel 2 fired at SW count    47977      - diff:    15989
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)
  - Calling timer_init(1, 8000000)
    initialization successful
  - timer_stop(1): stopped
  - timer_set(1, 0, 40000)
    Successfully set timeout 40000 for channel 0
  - timer_set(1, 1, 80000)
    Successfully set timeout 80000 for channel 1
  - timer_set(1, 2, 120000)
    Successfully set timeout 120000 for channel 2
  - timer_start(1)
  - Results:
    - channel 0 fired at SW count    16000      - init:    16000
    - channel 1 fired at SW count    31988      - diff:    15988
    - channel 2 fired at SW count    47977      - diff:    15989
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)
  - Calling timer_init(1, 4000000)
    initialization successful
  - timer_stop(1): stopped
  - timer_set(1, 0, 20000)
    Successfully set timeout 20000 for channel 0
  - timer_set(1, 1, 40000)
    Successfully set timeout 40000 for channel 1
  - timer_set(1, 2, 60000)
    Successfully set timeout 60000 for channel 2
  - timer_start(1)
  - Results:
    - channel 0 fired at SW count    16000      - init:    16000
    - channel 1 fired at SW count    31988      - diff:    15988
    - channel 2 fired at SW count    47977      - diff:    15989
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)

TIMER 2
=======

  - supported frequencies:
    0: 16000000
    1: 8000000
    2: 4000000
    ....
    9: 31250
  - Calling timer_init(2, 16000000)
    initialization successful
  - timer_stop(2): stopped
  - timer_set(2, 0, 80000)
    Successfully set timeout 80000 for channel 0
  - timer_set(2, 1, 160000)
    Successfully set timeout 160000 for channel 1
  - timer_set(2, 2, 240000)
    Successfully set timeout 240000 for channel 2
  - timer_set(2, 3, 320000)
    Successfully set timeout 320000 for channel 3
  - timer_set(2, 4, 400000)
    Successfully set timeout 400000 for channel 4
  - timer_start(2)
  - Results:
    - channel 0 fired at SW count    16000      - init:    16000
    - channel 1 fired at SW count    31986      - diff:    15986
    - channel 2 fired at SW count    47972      - diff:    15986
    - channel 3 fired at SW count    63959      - diff:    15987
    - channel 4 fired at SW count    79946      - diff:    15987
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)
  - Calling timer_init(2, 8000000)
    initialization successful
  - timer_stop(2): stopped
  - timer_set(2, 0, 40000)
    Successfully set timeout 40000 for channel 0
  - timer_set(2, 1, 80000)
    Successfully set timeout 80000 for channel 1
  - timer_set(2, 2, 120000)
    Successfully set timeout 120000 for channel 2
  - timer_set(2, 3, 160000)
    Successfully set timeout 160000 for channel 3
  - timer_set(2, 4, 200000)
    Successfully set timeout 200000 for channel 4
  - timer_start(2)
  - Results:
    - channel 0 fired at SW count    16000      - init:    16000
    - channel 1 fired at SW count    31986      - diff:    15986
    - channel 2 fired at SW count    47972      - diff:    15986
    - channel 3 fired at SW count    63959      - diff:    15987
    - channel 4 fired at SW count    79946      - diff:    15987
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)
  - Calling timer_init(2, 4000000)
    initialization successful
  - timer_stop(2): stopped
  - timer_set(2, 0, 20000)
    Successfully set timeout 20000 for channel 0
  - timer_set(2, 1, 40000)
    Successfully set timeout 40000 for channel 1
  - timer_set(2, 2, 60000)
    Successfully set timeout 60000 for channel 2
  - timer_set(2, 3, 80000)
    Successfully set timeout 80000 for channel 3
  - timer_set(2, 4, 100000)
    Successfully set timeout 100000 for channel 4
  - timer_start(2)
  - Results:
    - channel 0 fired at SW count    16000      - init:    16000
    - channel 1 fired at SW count    31986      - diff:    15986
    - channel 2 fired at SW count    47972      - diff:    15986
    - channel 3 fired at SW count    63959      - diff:    15987
    - channel 4 fired at SW count    79946      - diff:    15987
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)

TIMER 3
=======

  - supported frequencies:
    0: 16000000
    1: 8000000
    2: 4000000
    ....
    9: 31250
  - Calling timer_init(3, 16000000)
    initialization successful
  - timer_stop(3): stopped
  - timer_set(3, 0, 80000)
    Successfully set timeout 80000 for channel 0
  - timer_set(3, 1, 160000)
    Successfully set timeout 160000 for channel 1
  - timer_set(3, 2, 240000)
    Successfully set timeout 240000 for channel 2
  - timer_set(3, 3, 320000)
    Successfully set timeout 320000 for channel 3
  - timer_set(3, 4, 400000)
    Successfully set timeout 400000 for channel 4
  - timer_start(3)
  - Results:
    - channel 0 fired at SW count    16000      - init:    16000
    - channel 1 fired at SW count    31986      - diff:    15986
    - channel 2 fired at SW count    47972      - diff:    15986
    - channel 3 fired at SW count    63959      - diff:    15987
    - channel 4 fired at SW count    79946      - diff:    15987
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)
  - Calling timer_init(3, 8000000)
    initialization successful
  - timer_stop(3): stopped
  - timer_set(3, 0, 40000)
    Successfully set timeout 40000 for channel 0
  - timer_set(3, 1, 80000)
    Successfully set timeout 80000 for channel 1
  - timer_set(3, 2, 120000)
    Successfully set timeout 120000 for channel 2
  - timer_set(3, 3, 160000)
    Successfully set timeout 160000 for channel 3
  - timer_set(3, 4, 200000)
    Successfully set timeout 200000 for channel 4
  - timer_start(3)
  - Results:
    - channel 0 fired at SW count    16000      - init:    16000
    - channel 1 fired at SW count    31986      - diff:    15986
    - channel 2 fired at SW count    47972      - diff:    15986
    - channel 3 fired at SW count    63959      - diff:    15987
    - channel 4 fired at SW count    79946      - diff:    15987
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)
  - Calling timer_init(3, 4000000)
    initialization successful
  - timer_stop(3): stopped
  - timer_set(3, 0, 20000)
    Successfully set timeout 20000 for channel 0
  - timer_set(3, 1, 40000)
    Successfully set timeout 40000 for channel 1
  - timer_set(3, 2, 60000)
    Successfully set timeout 60000 for channel 2
  - timer_set(3, 3, 80000)
    Successfully set timeout 80000 for channel 3
  - timer_set(3, 4, 100000)
    Successfully set timeout 100000 for channel 4
  - timer_start(3)
  - Results:
    - channel 0 fired at SW count    16000      - init:    16000
    - channel 1 fired at SW count    31986      - diff:    15986
    - channel 2 fired at SW count    47972      - diff:    15986
    - channel 3 fired at SW count    63959      - diff:    15987
    - channel 4 fired at SW count    79946      - diff:    15987
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)

TEST SUCCEEDED

@maribu maribu added this pull request to the merge queue Dec 8, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 8, 2023
@maribu maribu force-pushed the periph_timer_query_freq-nrf5x branch from 3f32a1a to b40ab8f Compare December 8, 2023 22:23
@maribu maribu enabled auto-merge December 8, 2023 22:23
@maribu maribu added this pull request to the merge queue Dec 9, 2023
@maribu maribu removed this pull request from the merge queue due to a manual request Dec 9, 2023
@maribu maribu added this pull request to the merge queue Dec 9, 2023
@maribu maribu removed this pull request from the merge queue due to a manual request Dec 9, 2023
@maribu maribu added this pull request to the merge queue Dec 9, 2023
Merged via the queue into RIOT-OS:master with commit 95be5ed Dec 9, 2023
25 checks passed
@maribu
Copy link
Member Author

maribu commented Dec 9, 2023

Thx :-)

@maribu maribu deleted the periph_timer_query_freq-nrf5x branch December 9, 2023 13:23
@MrKevinWeiss MrKevinWeiss added this to the Release 2024.01 milestone Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: cpu Area: CPU/MCU ports Area: Kconfig Area: Kconfig integration CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: ARM Platform: This PR/issue effects ARM-based platforms Type: new feature The issue requests / The PR implemements a new feature for RIOT
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants