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/qn908x: implement periph_timer_query_freqs #20146

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-qn908x branch from a48b6ec to a3afdfe Compare December 5, 2023 20:57
@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/qn908x: implement periph_timer_query_freq cpu/qn908x: implement periph_timer_query_freqs Dec 5, 2023
@riot-ci
Copy link

riot-ci commented Dec 5, 2023

Murdock results

✔️ PASSED

35e140b cpu/qn908x: implement periph_timer_query_freqs

Success Failures Total Runtime
8082 0 8082 10m:23s

Artifacts

@maribu maribu force-pushed the periph_timer_query_freq-qn908x branch from a3afdfe to 35e140b Compare December 7, 2023 15:18
@maribu
Copy link
Member Author

maribu commented Dec 7, 2023

make BOARD=qn9080dk -C tests/periph/timer -j flash test
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 "qn9080dk" with MCU "qn908x".

"make" -C /home/maribu/Repos/software/RIOT/master/boards/common/init
"make" -C /home/maribu/Repos/software/RIOT/master/boards/qn9080dk
"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/qn908x
"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/qn908x
"make" -C /home/maribu/Repos/software/RIOT/master/cpu/cortexm_common
"make" -C /home/maribu/Repos/software/RIOT/master/cpu/qn908x/periph
"make" -C /home/maribu/Repos/software/RIOT/master/cpu/qn908x/vendor
"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/sys/div
"make" -C /home/maribu/Repos/software/RIOT/master/cpu/cortexm_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
  13564	   136	  2744	 16444	  403c	/home/maribu/Repos/software/RIOT/master/tests/periph/timer/bin/qn9080dk/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/qn9080dk/tests_timer-checksum.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
DEPRECATED! use 'adapter serial' not 'cmsis_dap_serial'
swd
Warn : Transport "swd" was already selected
Info : CMSIS-DAP: SWD supported
Info : CMSIS-DAP: JTAG supported
Info : CMSIS-DAP: Atomic commands supported
Info : CMSIS-DAP: FW Version = 1.10
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 1 TDO = 0 nTRST = 0 nRESET = 1
Info : CMSIS-DAP: Interface ready
Info : clock speed 1000 kHz
Info : SWD DPIDR 0x2ba01477
Info : [qn908x.cpu] Cortex-M4 r0p1 processor detected
Info : [qn908x.cpu] target has 6 breakpoints, 4 watchpoints
Info : starting gdb server for qn908x.cpu on 0
Info : Listening on port 41101 for gdb connections
    TargetName         Type       Endian TapName            State       
--  ------------------ ---------- ------ ------------------ ------------
 0* qn908x.cpu         cortex_m   little qn908x.cpu         unknown
[qn908x.cpu] halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x03000738 msp: 0x04010000
Info : Detected flash size: 512 KiB
Info : Padding image section 0 at 0x01000114 with 12 bytes
Warn : Adding extra erase range, 0x01003590 .. 0x010037ff
auto erase enabled
wrote 13712 bytes from file /home/maribu/Repos/software/RIOT/master/tests/periph/timer/bin/qn9080dk/tests_timer-checksum.elf in 0.228630s (58.569 KiB/s)
verified 13700 bytes in 0.081245s (164.674 KiB/s)
Info : SWD DPIDR 0x2ba01477
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.
Y�p: Press s to start test, r to print it is ready
Help: Press s to start test, r to print it is ready
Help: Press s to start test, r to print it is ready
Help: Press s to start test, r to print it is ready
Help: Press s to start test, r to print it is ready
Help: Press s to start test, r to print it is ready
Help: Press s to start test, r to print it is ready
Help: Press s to start test, r to print it is ready
Help: Press s to start test, r to print it is ready
Help: Press s to start test, r to print it is ready
Help: Press s to start test, r to print it is ready
Help: Press s to start test, r to print it is ready
Help: Press s to start test, r to print it is ready
Help: Press s to start test, r to print it is ready
Help: Press s to start test, r to print it is ready
Help: Press s to start test, r to print it is ready
READY
s
START
main(): This is RIOT! (Version: 2023.10-devel-690-g35e14-periph_timer_query_freq-qn908x)

Test for peripheral TIMERs

Available timers: 4

TIMER 0
=======

  - supported frequencies:
    0: 32000000
    1: 16000000
    2: 10666666
    ....
    255: 0
  - Calling timer_init(0, 32000000)
    initialization successful
  - timer_stop(0): stopped
  - timer_set(0, 0, 160000)
    Successfully set timeout 160000 for channel 0
  - timer_set(0, 1, 320000)
    Successfully set timeout 320000 for channel 1
  - timer_set(0, 2, 480000)
    Successfully set timeout 480000 for channel 2
  - timer_set(0, 3, 640000)
    Successfully set timeout 640000 for channel 3
  - timer_start(0)
  - Results:
    - channel 0 fired at SW count        0      - init:        0
    - channel 1 fired at SW count        0      - diff:        0
    - channel 2 fired at SW count     2759      - diff:     2759
    - channel 3 fired at SW count    21060      - diff:    18301
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)
  - 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_set(0, 3, 320000)
    Successfully set timeout 320000 for channel 3
  - timer_start(0)
  - Results:
    - channel 0 fired at SW count        0      - init:        0
    - channel 1 fired at SW count        0      - diff:        0
    - channel 2 fired at SW count     2759      - diff:     2759
    - channel 3 fired at SW count    21060      - diff:    18301
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)
  - Calling timer_init(0, 10666666)
    initialization successful
  - timer_stop(0): stopped
  - timer_set(0, 0, 53333)
    Successfully set timeout 53333 for channel 0
  - timer_set(0, 1, 106666)
    Successfully set timeout 106666 for channel 1
  - timer_set(0, 2, 159999)
    Successfully set timeout 159999 for channel 2
  - timer_set(0, 3, 213332)
    Successfully set timeout 213332 for channel 3
  - timer_start(0)
  - Results:
    - channel 0 fired at SW count        0      - init:        0
    - channel 1 fired at SW count        0      - diff:        0
    - channel 2 fired at SW count     2759      - diff:     2759
    - channel 3 fired at SW count    21060      - diff:    18301
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)

TIMER 1
=======

  - supported frequencies:
    0: 32000000
    1: 16000000
    2: 10666666
    ....
    255: 0
  - Calling timer_init(1, 32000000)
    initialization successful
  - timer_stop(1): stopped
  - timer_set(1, 0, 160000)
    Successfully set timeout 160000 for channel 0
  - timer_set(1, 1, 320000)
    Successfully set timeout 320000 for channel 1
  - timer_set(1, 2, 480000)
    Successfully set timeout 480000 for channel 2
  - timer_set(1, 3, 640000)
    Successfully set timeout 640000 for channel 3
  - timer_start(1)
  - Results:
    - channel 0 fired at SW count        0      - init:        0
    - channel 1 fired at SW count        0      - diff:        0
    - channel 2 fired at SW count     2759      - diff:     2759
    - channel 3 fired at SW count    21060      - diff:    18301
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)
  - 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_set(1, 3, 320000)
    Successfully set timeout 320000 for channel 3
  - timer_start(1)
  - Results:
    - channel 0 fired at SW count        0      - init:        0
    - channel 1 fired at SW count        0      - diff:        0
    - channel 2 fired at SW count     2759      - diff:     2759
    - channel 3 fired at SW count    21060      - diff:    18301
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)
  - Calling timer_init(1, 10666666)
    initialization successful
  - timer_stop(1): stopped
  - timer_set(1, 0, 53333)
    Successfully set timeout 53333 for channel 0
  - timer_set(1, 1, 106666)
    Successfully set timeout 106666 for channel 1
  - timer_set(1, 2, 159999)
    Successfully set timeout 159999 for channel 2
  - timer_set(1, 3, 213332)
    Successfully set timeout 213332 for channel 3
  - timer_start(1)
  - Results:
    - channel 0 fired at SW count        0      - init:        0
    - channel 1 fired at SW count        0      - diff:        0
    - channel 2 fired at SW count     2759      - diff:     2759
    - channel 3 fired at SW count    21060      - diff:    18301
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)

TIMER 2
=======

  - supported frequencies:
    0: 32000000
    1: 16000000
    2: 10666666
    ....
    255: 0
  - Calling timer_init(2, 32000000)
    initialization successful
  - timer_stop(2): stopped
  - timer_set(2, 0, 160000)
    Successfully set timeout 160000 for channel 0
  - timer_set(2, 1, 320000)
    Successfully set timeout 320000 for channel 1
  - timer_set(2, 2, 480000)
    Successfully set timeout 480000 for channel 2
  - timer_set(2, 3, 640000)
    Successfully set timeout 640000 for channel 3
  - timer_start(2)
  - Results:
    - channel 0 fired at SW count        0      - init:        0
    - channel 1 fired at SW count        0      - diff:        0
    - channel 2 fired at SW count     2758      - diff:     2758
    - channel 3 fired at SW count    21060      - diff:    18302
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)
  - 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_start(2)
  - Results:
    - channel 0 fired at SW count        0      - init:        0
    - channel 1 fired at SW count        0      - diff:        0
    - channel 2 fired at SW count     2759      - diff:     2759
    - channel 3 fired at SW count    21060      - diff:    18301
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)
  - Calling timer_init(2, 10666666)
    initialization successful
  - timer_stop(2): stopped
  - timer_set(2, 0, 53333)
    Successfully set timeout 53333 for channel 0
  - timer_set(2, 1, 106666)
    Successfully set timeout 106666 for channel 1
  - timer_set(2, 2, 159999)
    Successfully set timeout 159999 for channel 2
  - timer_set(2, 3, 213332)
    Successfully set timeout 213332 for channel 3
  - timer_start(2)
  - Results:
    - channel 0 fired at SW count        0      - init:        0
    - channel 1 fired at SW count        0      - diff:        0
    - channel 2 fired at SW count     2759      - diff:     2759
    - channel 3 fired at SW count    21060      - diff:    18301
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)

TIMER 3
=======

  - supported frequencies:
    0: 32000000
    1: 16000000
    2: 10666666
    ....
    255: 0
  - Calling timer_init(3, 32000000)
    initialization successful
  - timer_stop(3): stopped
  - timer_set(3, 0, 160000)
    Successfully set timeout 160000 for channel 0
  - timer_set(3, 1, 320000)
    Successfully set timeout 320000 for channel 1
  - timer_set(3, 2, 480000)
    Successfully set timeout 480000 for channel 2
  - timer_set(3, 3, 640000)
    Successfully set timeout 640000 for channel 3
  - timer_start(3)
  - Results:
    - channel 0 fired at SW count        0      - init:        0
    - channel 1 fired at SW count        0      - diff:        0
    - channel 2 fired at SW count     2759      - diff:     2759
    - channel 3 fired at SW count    21060      - diff:    18301
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)
  - 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_start(3)
  - Results:
    - channel 0 fired at SW count        0      - init:        0
    - channel 1 fired at SW count        0      - diff:        0
    - channel 2 fired at SW count     2759      - diff:     2759
    - channel 3 fired at SW count    21060      - diff:    18301
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)
  - Calling timer_init(3, 10666666)
    initialization successful
  - timer_stop(3): stopped
  - timer_set(3, 0, 53333)
    Successfully set timeout 53333 for channel 0
  - timer_set(3, 1, 106666)
    Successfully set timeout 106666 for channel 1
  - timer_set(3, 2, 159999)
    Successfully set timeout 159999 for channel 2
  - timer_set(3, 3, 213332)
    Successfully set timeout 213332 for channel 3
  - timer_start(3)
  - Results:
    - channel 0 fired at SW count        0      - init:        0
    - channel 1 fired at SW count        0      - diff:        0
    - channel 2 fired at SW count     2759      - diff:     2759
    - channel 3 fired at SW count    21060      - diff:    18301
  - 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
Merged via the queue into RIOT-OS:master with commit 2a6ef9f Dec 9, 2023
26 checks passed
@maribu
Copy link
Member Author

maribu commented Dec 9, 2023

Thx :-)

@maribu maribu deleted the periph_timer_query_freq-qn908x branch December 9, 2023 07:33
@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