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/cc26xx_cc13xx: implement periph_timer_query_freqs #20143

Merged

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-cc26xx_cc13xx branch from f3d32d5 to c0aed9b Compare December 5, 2023 20:47
@maribu maribu added 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
@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 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

c18c47d cpu/cc26xx_cc13xx: implement periph_timer_query_freqs

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

Artifacts

@maribu maribu changed the title cpu/cc26xx_cc13xx: implement periph_timer_query_freq cpu/cc26xx_cc13xx: implement periph_timer_query_freqs Dec 5, 2023
@maribu maribu force-pushed the periph_timer_query_freq-cc26xx_cc13xx branch from c0aed9b to c18c47d Compare December 7, 2023 15:17
@github-actions github-actions bot removed Area: build system Area: Build system Area: drivers Area: Device drivers labels Dec 7, 2023
@maribu
Copy link
Member Author

maribu commented Dec 7, 2023

I couldn't trigger spurious IRQs anymore with the bug in the test fixed:

~/Repos/software/RIOT/master/tests/periph/timer % make BOARD=cc2650stk flash test -j  
"make" -C /home/maribu/Repos/software/RIOT/master/pkg/cmsis/ 
Building application "tests_timer" for "cc2650stk" with MCU "cc26x0_cc13x0".

"make" -C /home/maribu/Repos/software/RIOT/master/boards/cc2650stk
"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/cc26x0_cc13x0
"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/cc26x0_cc13x0/periph
"make" -C /home/maribu/Repos/software/RIOT/master/drivers/periph_common
"make" -C /home/maribu/Repos/software/RIOT/master/cpu/cc26x0_cc13x0/vendor/driverlib
"make" -C /home/maribu/Repos/software/RIOT/master/cpu/cc26xx_cc13xx
"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/sys/div
"make" -C /home/maribu/Repos/software/RIOT/master/sys/isrpipe
"make" -C /home/maribu/Repos/software/RIOT/master/cpu/cortexm_common/periph
"make" -C /home/maribu/Repos/software/RIOT/master/sys/libc
"make" -C /home/maribu/Repos/software/RIOT/master/cpu/cc26xx_cc13xx/periph
"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
  14308	   124	  2724	 17156	  4304	/home/maribu/Repos/software/RIOT/master/tests/periph/timer/bin/cc2650stk/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/cc2650stk/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
jtag
cortex_m reset_config vectreset
Warn : An adapter speed is not selected in the init scripts. OpenOCD will try to run the adapter at very low speed (100 kHz).
Warn : To remove this warnings and achieve reasonable communication speed with the target, set "adapter speed" or "jtag_rclk" in the init scripts.
Info : XDS110: connected
Info : XDS110: vid/pid = 0451/bef3
Info : XDS110: firmware version = 3.0.0.22
Info : XDS110: hardware version = 0x002a
Info : XDS110: connected to target via JTAG
Info : XDS110: TCK set to 2500 kHz
Info : clock speed 100 kHz
Info : JTAG tap: cc26x0.jrc tap/device found: 0x9b99a02f (mfg: 0x017 (Texas Instruments), part: 0xb99a, ver: 0x9)
Info : JTAG tap: cc26x0.cpu enabled
Info : [cc26x0.cpu] Cortex-M3 r2p1 processor detected
Info : [cc26x0.cpu] target has 6 breakpoints, 4 watchpoints
Info : starting gdb server for cc26x0.cpu on 0
Info : Listening on port 33929 for gdb connections
    TargetName         Type       Endian TapName            State       
--  ------------------ ---------- ------ ------------------ ------------
 0* cc26x0.cpu         cortex_m   little cc26x0.cpu         unknown
Warn : [cc26x0.cpu] target was in unknown state when halt was requested
auto erase enabled
wrote 16384 bytes from file /home/maribu/Repos/software/RIOT/master/tests/periph/timer/bin/cc2650stk/tests_timer.elf in 7.864296s (2.035 KiB/s)
verified 14432 bytes in 0.244236s (57.705 KiB/s)
Info : JTAG tap: cc26x0.jrc tap/device found: 0x9b99a02f (mfg: 0x017 (Texas Instruments), part: 0xb99a, ver: 0x9)
Info : JTAG tap: cc26x0.cpu enabled
Warn : [cc26x0.cpu] Only resetting the Cortex-M core, use a reset-init event handler to reset any peripherals or configure hardware srst support.
shutdown command invoked
Info : XDS110: disconnected
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-gc18c4-HEAD)

Test for peripheral TIMERs

Available timers: 4

TIMER 0
=======

  - supported frequencies:
    0: 48000000
    1: 24000000
    2: 16000000
    ....
    255: 187500
  - Calling timer_init(0, 48000000)
    initialization successful
  - timer_stop(0): stopped
  - timer_set(0, 0, 240000)
    Successfully set timeout 240000 for channel 0
  - timer_set(0, 1, 480000)
    Successfully set timeout 480000 for channel 1
  - timer_start(0)
  - Results:
    - channel 0 fired at SW count     2056      - init:     2056
    - channel 1 fired at SW count     1016      - diff: 4294966256
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)
  - Calling timer_init(0, 24000000)
    initialization successful
  - timer_stop(0): stopped
  - timer_set(0, 0, 120000)
    Successfully set timeout 120000 for channel 0
  - timer_set(0, 1, 240000)
    Successfully set timeout 240000 for channel 1
  - timer_start(0)
  - Results:
    - channel 0 fired at SW count     5179      - init:     5179
    - channel 1 fired at SW count     4138      - diff: 4294966255
  - 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_start(0)
  - Results:
    - channel 0 fired at SW count     2066      - init:     2066
    - channel 1 fired at SW count     4131      - diff:     2065
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)

TIMER 1
=======

  - supported frequencies:
    0: 48000000
  - Calling timer_init(1, 48000000)
    initialization successful
  - timer_stop(1): stopped
  - timer_set(1, 0, 240000)
    Successfully set timeout 240000 for channel 0
  - timer_start(1)
  - Results:
    - channel 0 fired at SW count    11429      - init:    11429
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)

TIMER 2
=======

  - supported frequencies:
    0: 48000000
    1: 24000000
    2: 16000000
    ....
    255: 187500
  - Calling timer_init(2, 48000000)
    initialization successful
  - timer_stop(2): stopped
  - timer_set(2, 0, 240000)
    Successfully set timeout 240000 for channel 0
  - timer_set(2, 1, 480000)
    Successfully set timeout 480000 for channel 1
  - timer_start(2)
  - Results:
    - channel 0 fired at SW count     2058      - init:     2058
    - channel 1 fired at SW count     1016      - diff: 4294966254
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)
  - Calling timer_init(2, 24000000)
    initialization successful
  - timer_stop(2): stopped
  - timer_set(2, 0, 120000)
    Successfully set timeout 120000 for channel 0
  - timer_set(2, 1, 240000)
    Successfully set timeout 240000 for channel 1
  - timer_start(2)
  - Results:
    - channel 0 fired at SW count     5179      - init:     5179
    - channel 1 fired at SW count     4138      - diff: 4294966255
  - 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_start(2)
  - Results:
    - channel 0 fired at SW count     2066      - init:     2066
    - channel 1 fired at SW count     4130      - diff:     2064
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)

TIMER 3
=======

  - supported frequencies:
    0: 48000000
  - Calling timer_init(3, 48000000)
    initialization successful
  - timer_stop(3): stopped
  - timer_set(3, 0, 240000)
    Successfully set timeout 240000 for channel 0
  - timer_start(3)
  - Results:
    - channel 0 fired at SW count    11429      - init:    11429
  - 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 9718e9a 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-cc26xx_cc13xx branch December 8, 2023 22:24
@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