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/atmega_common: implement periph_timer_query_freqs #20142

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 #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 Area: build system Area: Build system Platform: AVR Platform: This PR/issue effects AVR-based platforms 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-atmega branch from d75dc19 to d3c26fb Compare December 5, 2023 20:46
@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
@riot-ci
Copy link

riot-ci commented Dec 5, 2023

Murdock results

✔️ PASSED

e78630f cpu/atmega_common: implement periph_timer_query_freqs

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

Artifacts

@maribu maribu changed the title cpu/atmega_common: implement periph_timer_query_freq cpu/atmega_common: implement periph_timer_query_freqs Dec 5, 2023
@maribu maribu force-pushed the periph_timer_query_freq-atmega branch from d3c26fb to e78630f Compare December 7, 2023 15:15
@maribu
Copy link
Member Author

maribu commented Dec 7, 2023

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

"make" -C /home/maribu/Repos/software/RIOT/master/boards/arduino-uno
"make" -C /home/maribu/Repos/software/RIOT/master/boards/common/init
"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/atmega328p
"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/arduino-atmega
"make" -C /home/maribu/Repos/software/RIOT/master/cpu/atmega_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/sys/isrpipe
"make" -C /home/maribu/Repos/software/RIOT/master/boards/common/atmega
"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/pm_layered
"make" -C /home/maribu/Repos/software/RIOT/master/sys/preprocessor
"make" -C /home/maribu/Repos/software/RIOT/master/cpu/atmega_common/periph
"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/cpu/avr8_common
"make" -C /home/maribu/Repos/software/RIOT/master/sys/test_utils/print_stack_usage
"make" -C /home/maribu/Repos/software/RIOT/master/sys/tiny_strerror
"make" -C /home/maribu/Repos/software/RIOT/master/sys/tsrb
"make" -C /home/maribu/Repos/software/RIOT/master/cpu/avr8_common/avr_libc_extra
"make" -C /home/maribu/Repos/software/RIOT/master/cpu/avr8_common/periph
   text	  data	   bss	   dec	   hex	filename
   9986	   218	   983	 11187	  2bb3	/home/maribu/Repos/software/RIOT/master/tests/periph/timer/bin/arduino-uno/tests_timer.elf
avrdude -c arduino -p m328p -P /dev/ttyACM1  -U flash:w:/home/maribu/Repos/software/RIOT/master/tests/periph/timer/bin/arduino-uno/tests_timer.hex
avrdude: AVR device initialized and ready to accept instructions
avrdude: device signature = 0x1e950f (probably m328p)
avrdude: Note: flash memory has been specified, an erase cycle will be performed.
         To disable this feature, specify the -D option.
avrdude: erasing chip

avrdude: processing -U flash:w:/home/maribu/Repos/software/RIOT/master/tests/periph/timer/bin/arduino-uno/tests_timer.hex:i
avrdude: reading input file /home/maribu/Repos/software/RIOT/master/tests/periph/timer/bin/arduino-uno/tests_timer.hex for flash
         with 10204 bytes in 1 section within [0, 0x27db]
         using 80 pages and 36 pad bytes
avrdude: writing 10204 bytes flash ...
Writing | ################################################## | 100% 1.82 s 
avrdude: 10204 bytes of flash written
avrdude: verifying flash memory against /home/maribu/Repos/software/RIOT/master/tests/periph/timer/bin/arduino-uno/tests_timer.hex
Reading | ################################################## | 100% 1.33 s 
avrdude: 10204 bytes of flash verified

avrdude done.  Thank you.

r
/home/maribu/Repos/software/RIOT/master/dist/tools/pyterm/pyterm -p "/dev/ttyACM1" -b "9600" --no-reconnect --noprefix --no-repeat-command-on-empty-line 
Connect to serial port /dev/ttyACM1
Welcome to pyterm!
Type '/exit' to exit.


Help: Press s to start test, r to print it is ready
READY
s
START
main(): This is RIOT! (Version: 2023.10-devel-690-ge7863-periph_timer_query_freq-atmega)

Test for peripheral TIMERs

Available timers: 1

TIMER 0
=======

  - supported frequencies:
    0: 16000000
    1: 2000000
    2: 250000
    ....
    4: 15625
  - Calling timer_init(0, 16000000)
    initialization successful
  - timer_stop(0): stopped
  - timer_set(0, 0, 14464)
    Successfully set timeout 14464 for channel 0
  - timer_set(0, 1, 28928)
    Successfully set timeout 28928 for channel 1
  - timer_start(0)
  - Results:
    - channel 0 fired at SW count      402      - init:      402
    - channel 1 fired at SW count      797      - diff:      395
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)
  - Calling timer_init(0, 2000000)
    initialization successful
  - timer_stop(0): stopped
  - timer_set(0, 0, 10000)
    Successfully set timeout 10000 for channel 0
  - timer_set(0, 1, 20000)
    Successfully set timeout 20000 for channel 1
  - timer_start(0)
  - Results:
    - channel 0 fired at SW count     2220      - init:     2220
    - channel 1 fired at SW count     4436      - diff:     2216
  - 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     2221      - init:     2221
    - channel 1 fired at SW count     4437      - diff:     2216
  - 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.

👍 saw @maribu testing these and he also provides test output for every one to see 👍

@maribu maribu added this pull request to the merge queue Dec 8, 2023
Merged via the queue into RIOT-OS:master with commit 481e3a9 Dec 8, 2023
26 checks passed
@maribu
Copy link
Member Author

maribu commented Dec 8, 2023

Thx :-)

@maribu maribu deleted the periph_timer_query_freq-atmega branch December 8, 2023 14:12
@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: AVR Platform: This PR/issue effects AVR-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