Skip to content

cpu/stm32: implement periph_timer_query_freqs #20148

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

Merged
merged 1 commit into from
Dec 8, 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 and includes:

@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-stm32 branch from 222cfb1 to 00339ca Compare December 5, 2023 21:00
@maribu maribu removed the State: waiting for other PR State: The PR requires another PR to be merged first label Dec 5, 2023
@github-actions github-actions bot removed Area: build system Area: Build system Area: drivers Area: Device drivers labels Dec 5, 2023
@maribu maribu added 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 changed the title cpu/stm32: implement periph_timer_query_freq cpu/stm32: implement periph_timer_query_freqs Dec 5, 2023
@riot-ci
Copy link

riot-ci commented Dec 5, 2023

Murdock results

✔️ PASSED

3868a7f cpu/stm32: implement periph_timer_query_freqs

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

Artifacts

@github-actions github-actions bot removed Area: build system Area: Build system Area: drivers Area: Device drivers labels Dec 7, 2023
@maribu maribu force-pushed the periph_timer_query_freq-stm32 branch from 6873e64 to 298f392 Compare December 7, 2023 14:58
@github-actions github-actions bot added the Area: tests Area: tests and testing framework label Dec 7, 2023
@maribu
Copy link
Member Author

maribu commented Dec 7, 2023

Turns out the spurious IRQ issue on the F7 was actually a bug in the test 😅

@maribu maribu force-pushed the periph_timer_query_freq-stm32 branch from 298f392 to 3868a7f Compare December 7, 2023 15:15
@github-actions github-actions bot removed the Area: tests Area: tests and testing framework label Dec 7, 2023
@maribu
Copy link
Member Author

maribu commented Dec 7, 2023

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

"make" -C /home/maribu/Repos/software/RIOT/master/pkg/cmsis/ 
"make" -C /home/maribu/Repos/software/RIOT/master/boards/common/init
"make" -C /home/maribu/Repos/software/RIOT/master/boards/nucleo-f767zi
"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/stm32
"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/nucleo
"make" -C /home/maribu/Repos/software/RIOT/master/drivers/periph_common
"make" -C /home/maribu/Repos/software/RIOT/master/cpu/cortexm_common
"make" -C /home/maribu/Repos/software/RIOT/master/sys/auto_init
"make" -C /home/maribu/Repos/software/RIOT/master/cpu/stm32/periph
"make" -C /home/maribu/Repos/software/RIOT/master/sys/div
"make" -C /home/maribu/Repos/software/RIOT/master/cpu/stm32/stmclk
"make" -C /home/maribu/Repos/software/RIOT/master/sys/isrpipe
"make" -C /home/maribu/Repos/software/RIOT/master/cpu/stm32/vectors
"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
"make" -C /home/maribu/Repos/software/RIOT/master/cpu/cortexm_common/periph
   text	  data	   bss	   dec	   hex	filename
  13544	   128	  2744	 16416	  4020	/home/maribu/Repos/software/RIOT/master/tests/periph/timer/bin/nucleo-f767zi/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/nucleo-f767zi/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
DEPRECATED! use 'adapter serial' not 'hla_serial'
hla_swd
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
srst_only separate srst_nogate srst_open_drain connect_assert_srst
Info : clock speed 2000 kHz
Info : STLINK V2J29M18 (API v2) VID:PID 0483:374B
Info : Target voltage: 3.250132
Info : [stm32f7x.cpu] Cortex-M7 r1p0 processor detected
Info : [stm32f7x.cpu] target has 8 breakpoints, 4 watchpoints
Info : starting gdb server for stm32f7x.cpu on 0
Info : Listening on port 37085 for gdb connections
    TargetName         Type       Endian TapName            State       
--  ------------------ ---------- ------ ------------------ ------------
 0* stm32f7x.cpu       hla_target little stm32f7x.cpu       unknown
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
[stm32f7x.cpu] halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x08000c68 msp: 0x20000200
Info : device id = 0x10016451
Info : flash size = 2048 KiB
Info : Single Bank 2048 kiB STM32F76x/77x found
auto erase enabled
wrote 32768 bytes from file /home/maribu/Repos/software/RIOT/master/tests/periph/timer/bin/nucleo-f767zi/tests_timer.elf in 0.747627s (42.802 KiB/s)
verified 13672 bytes in 0.115728s (115.370 KiB/s)
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
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.
�q�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-g3868a7-periph_timer_query_freq-stm32)

Test for peripheral TIMERs

Available timers: 1

TIMER 0
=======

  - supported frequencies:
    0: 108000000
    1: 54000000
    2: 36000000
    ....
    65535: 1647
  - Calling timer_init(0, 108000000)
    initialization successful
  - timer_stop(0): stopped
  - timer_set(0, 0, 540000)
    Successfully set timeout 540000 for channel 0
  - timer_set(0, 1, 1080000)
    Successfully set timeout 1080000 for channel 1
  - timer_set(0, 2, 1620000)
    Successfully set timeout 1620000 for channel 2
  - timer_set(0, 3, 2160000)
    Successfully set timeout 2160000 for channel 3
  - timer_start(0)
  - Results:
    - channel 0 fired at SW count    22040      - init:    22040
    - channel 1 fired at SW count    44072      - diff:    22032
    - channel 2 fired at SW count    66103      - diff:    22031
    - channel 3 fired at SW count    88135      - diff:    22032
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)
  - Calling timer_init(0, 54000000)
    initialization successful
  - timer_stop(0): stopped
  - timer_set(0, 0, 270000)
    Successfully set timeout 270000 for channel 0
  - timer_set(0, 1, 540000)
    Successfully set timeout 540000 for channel 1
  - timer_set(0, 2, 810000)
    Successfully set timeout 810000 for channel 2
  - timer_set(0, 3, 1080000)
    Successfully set timeout 1080000 for channel 3
  - timer_start(0)
  - Results:
    - channel 0 fired at SW count    22040      - init:    22040
    - channel 1 fired at SW count    44072      - diff:    22032
    - channel 2 fired at SW count    66103      - diff:    22031
    - channel 3 fired at SW count    88135      - diff:    22032
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)
  - Calling timer_init(0, 36000000)
    initialization successful
  - timer_stop(0): stopped
  - timer_set(0, 0, 180000)
    Successfully set timeout 180000 for channel 0
  - timer_set(0, 1, 360000)
    Successfully set timeout 360000 for channel 1
  - timer_set(0, 2, 540000)
    Successfully set timeout 540000 for channel 2
  - timer_set(0, 3, 720000)
    Successfully set timeout 720000 for channel 3
  - timer_start(0)
  - Results:
    - channel 0 fired at SW count    22040      - init:    22040
    - channel 1 fired at SW count    44072      - diff:    22032
    - channel 2 fired at SW count    66103      - diff:    22031
    - channel 3 fired at SW count    88135      - diff:    22032
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)

TEST SUCCEEDED

Copy link
Contributor

@kfessel kfessel left a comment

Choose a reason for hiding this comment

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

"watched" @maribu run the test

@maribu maribu added this pull request to the merge queue Dec 7, 2023
Merged via the queue into RIOT-OS:master with commit b0261f3 Dec 8, 2023
@maribu maribu deleted the periph_timer_query_freq-stm32 branch December 8, 2023 06:52
@maribu
Copy link
Member Author

maribu commented Dec 8, 2023

Thx :-)

@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