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/sam0_common: implement periph_timer_query_freqs #20147

Merged
merged 1 commit into from
Dec 7, 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-sam0 branch from 63aab34 to faf923b Compare December 5, 2023 20:59
@github-actions github-actions bot removed Area: build system Area: Build system Area: drivers Area: Device drivers 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/sam0_common: implement periph_timer_query_freq cpu/sam0_common: implement periph_timer_query_freqs Dec 5, 2023
@riot-ci
Copy link

riot-ci commented Dec 5, 2023

Murdock results

✔️ PASSED

b6a7815 cpu/sam0_common: implement periph_timer_query_freqs

Success Failures Total Runtime
8082 0 8082 09m:48s

Artifacts

@maribu maribu force-pushed the periph_timer_query_freq-sam0 branch from faf923b to b6a7815 Compare December 7, 2023 15:18
@maribu
Copy link
Member Author

maribu commented Dec 7, 2023

For future reference, the test output as currently looks like this:

make BOARD=samr21-xpro -C tests/periph/timer flash test -j
make: Entering directory '/home/maribu/Repos/software/RIOT/master/tests/periph/timer'
[INFO] edbg binary not found - building it from source now
CC= CFLAGS= make -C /home/maribu/Repos/software/RIOT/master/dist/tools/edbg
env -i PATH="/home/maribu/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/maribu/.go/bin" TERM="xterm" "make" -C "/home/maribu/Repos/software/RIOT/master/dist/tools/edbg/bin"
make: Entering directory '/home/maribu/Repos/software/RIOT/master/dist/tools/edbg/bin'
gcc -W -Wall -Wextra -O3 -std=gnu11 dap.c edbg.c utils.c target.c target_atmel_cm0p.c target_atmel_cm3.c target_atmel_cm4.c target_atmel_cm7.c target_atmel_cm4v2.c target_mchp_cm23.c target_st_stm32g0.c target_gd_gd32f4xx.c target_nu_m480.c target_lattice_lcmxo2.c target_rpi_rp2040.c  dbg_lin.c -ludev -o edbg
"make" -C /home/maribu/Repos/software/RIOT/master/pkg/cmsis/ 
Building application "tests_timer" for "samr21-xpro" with MCU "samd21".

"make" -C /home/maribu/Repos/software/RIOT/master/boards/common/init
"make" -C /home/maribu/Repos/software/RIOT/master/boards/samr21-xpro
"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/samd21
"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/cpu/cortexm_common
"make" -C /home/maribu/Repos/software/RIOT/master/cpu/sam0_common
"make" -C /home/maribu/Repos/software/RIOT/master/cpu/samd21/periph
"make" -C /home/maribu/Repos/software/RIOT/master/cpu/samd21/vectors
"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/cpu/sam0_common/periph
"make" -C /home/maribu/Repos/software/RIOT/master/sys/div
"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/pm_layered
"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
  12780	   124	  2720	 15624	  3d08	/home/maribu/Repos/software/RIOT/master/tests/periph/timer/bin/samr21-xpro/tests_timer.elf
make: Leaving directory '/home/maribu/Repos/software/RIOT/master/dist/tools/edbg/bin'
mv /home/maribu/Repos/software/RIOT/master/dist/tools/edbg/bin/edbg .
[INFO] edbg binary successfully built!
/home/maribu/Repos/software/RIOT/master/dist/tools/edbg/edbg.sh flash /home/maribu/Repos/software/RIOT/master/tests/periph/timer/bin/samr21-xpro/tests_timer.bin
### Flashing Target ###
Debugger: ATMEL EDBG CMSIS-DAP ATML2127031800009225 03.25.01B6 (S)
Clock frequency: 16.0 MHz
Target: SAM R21G18 (Rev C)
Verification...
at address 0x4 expected 0x29, read 0x21
Error: verification failed
Debugger: ATMEL EDBG CMSIS-DAP ATML2127031800009225 03.25.01B6 (S)
Clock frequency: 16.0 MHz
Target: SAM R21G18 (Rev C)
Programming..... done.
Verification..... done.
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.
U����%���������х������������ɥ�сJсJ́�����READY
s
START
main(): This is RIOT! (Version: 2023.10-devel-690-gb6a781-periph_timer_query_freq-sam0)

Test for peripheral TIMERs

Available timers: 2

TIMER 0
=======

  - supported frequencies:
    0: 1000000
    1: 500000
    2: 250000
    ....
    7: 976
  - Calling timer_init(0, 1000000)
    initialization successful
  - timer_stop(0): stopped
  - timer_set(0, 0, 5000)
    Successfully set timeout 5000 for channel 0
  - timer_set(0, 1, 10000)
    Successfully set timeout 10000 for channel 1
  - timer_start(0)
  - Results:
    - channel 0 fired at SW count     8576      - init:     8576
    - channel 1 fired at SW count    17142      - diff:     8566
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)
  - Calling timer_init(0, 500000)
    initialization successful
  - timer_stop(0): stopped
  - timer_set(0, 0, 2500)
    Successfully set timeout 2500 for channel 0
  - timer_set(0, 1, 5000)
    Successfully set timeout 5000 for channel 1
  - timer_start(0)
  - Results:
    - channel 0 fired at SW count     8579      - init:     8579
    - channel 1 fired at SW count    17144      - diff:     8565
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)
  - Calling timer_init(0, 250000)
    initialization successful
  - timer_stop(0): stopped
  - timer_set(0, 0, 1250)
    Successfully set timeout 1250 for channel 0
  - timer_set(0, 1, 2500)
    Successfully set timeout 2500 for channel 1
  - timer_start(0)
  - Results:
    - channel 0 fired at SW count     8578      - init:     8578
    - channel 1 fired at SW count    17143      - diff:     8565
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)

TIMER 1
=======

  - supported frequencies:
    0: 1000000
    1: 500000
    2: 250000
    ....
    7: 976
  - Calling timer_init(1, 1000000)
    initialization successful
  - timer_stop(1): stopped
  - timer_set(1, 0, 5000)
    Successfully set timeout 5000 for channel 0
  - timer_set(1, 1, 10000)
    Successfully set timeout 10000 for channel 1
  - timer_start(1)
  - Results:
    - channel 0 fired at SW count     8576      - init:     8576
    - channel 1 fired at SW count    17141      - diff:     8565
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)
  - Calling timer_init(1, 500000)
    initialization successful
  - timer_stop(1): stopped
  - timer_set(1, 0, 2500)
    Successfully set timeout 2500 for channel 0
  - timer_set(1, 1, 5000)
    Successfully set timeout 5000 for channel 1
  - timer_start(1)
  - Results:
    - channel 0 fired at SW count     8579      - init:     8579
    - channel 1 fired at SW count    17144      - diff:     8565
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)
  - Calling timer_init(1, 250000)
    initialization successful
  - timer_stop(1): stopped
  - timer_set(1, 0, 1250)
    Successfully set timeout 1250 for channel 0
  - timer_set(1, 1, 2500)
    Successfully set timeout 2500 for channel 1
  - timer_start(1)
  - Results:
    - channel 0 fired at SW count     8582      - init:     8582
    - channel 1 fired at SW count    17147      - diff:     8565
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)

TEST SUCCEEDED

@maribu maribu enabled auto-merge December 7, 2023 15:54
@maribu maribu added this pull request to the merge queue Dec 7, 2023
Merged via the queue into RIOT-OS:master with commit eb2e698 Dec 7, 2023
26 checks passed
@maribu
Copy link
Member Author

maribu commented Dec 7, 2023

Thx :-)

@maribu maribu deleted the periph_timer_query_freq-sam0 branch December 7, 2023 21:58
@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