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/msp430/periph_timer: fix timer_query_freqs() #20574

Merged
merged 2 commits into from
Apr 15, 2024

Conversation

maribu
Copy link
Member

@maribu maribu commented Apr 14, 2024

Contribution description

The API doc for timer_query_freqs() says it should return 0 Hz as frequency when the prescaler index is out of range. This changes the MSP430 timer driver to live up to the spec.

It also sneaks in an extension to the test app, so that in the future offending code is more easily detected.

Testing procedure

Run the new test. It should pass with this PR, but would fail on master (when the next test is backported).

Issues/PRs references

None

maribu added 2 commits April 14, 2024 20:20
`timer_query_freqs()` should return 0 when index is out of range
according to the doc. This changes the code to live up to the
spec.
Also test that `timer_query_freqs()` for an index out of range
does return 0, as stated by the doc.
@maribu maribu added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Process: needs backport Integration Process: The PR is required to be backported to a release or feature branch labels Apr 14, 2024
@github-actions github-actions bot added Platform: MSP Platform: This PR/issue effects MSP-based platforms Area: tests Area: tests and testing framework Area: cpu Area: CPU/MCU ports labels Apr 14, 2024
@riot-ci
Copy link

riot-ci commented Apr 14, 2024

Murdock results

✔️ PASSED

189bb29 tests/periph/timer: also test for idx out of range

Success Failures Total Runtime
10038 0 10042 12m:14s

Artifacts

@maribu maribu added this pull request to the merge queue Apr 15, 2024
@maribu
Copy link
Member Author

maribu commented Apr 15, 2024

May I also backport the commit that increases the test coverage, or only the commit that contains the fix? (The chance that the increased tests coverage breaks unrelated things is pretty much zero, but it may find things we might want to fix.)

For documentation: purpose:

$ make BOARD=nucleo-f429zi -C tests/periph/timer flash test        
make: Entering directory '/home/maribu/Repos/software/RIOT/master/tests/periph/timer'
Building application "tests_timer" for "nucleo-f429zi" with CPU "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-f429zi
"make" -C /home/maribu/Repos/software/RIOT/master/boards/common/nucleo
"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/cpu/cortexm_common
"make" -C /home/maribu/Repos/software/RIOT/master/cpu/cortexm_common/periph
"make" -C /home/maribu/Repos/software/RIOT/master/cpu/stm32/periph
"make" -C /home/maribu/Repos/software/RIOT/master/cpu/stm32/stmclk
"make" -C /home/maribu/Repos/software/RIOT/master/cpu/stm32/vectors
"make" -C /home/maribu/Repos/software/RIOT/master/drivers
"make" -C /home/maribu/Repos/software/RIOT/master/drivers/periph_common
"make" -C /home/maribu/Repos/software/RIOT/master/sys
"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/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
"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
  13600	   128	  2752	 16480	  4060	/home/maribu/Repos/software/RIOT/master/tests/periph/timer/bin/nucleo-f429zi/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-f429zi/tests_timer.elf
### Flashing Target ###
Open On-Chip Debugger 0.12.0+dev-snapshot (2024-01-17-08:38)
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.258383
Info : [stm32f4x.cpu] Cortex-M4 r0p1 processor detected
Info : [stm32f4x.cpu] target has 6 breakpoints, 4 watchpoints
Info : [stm32f4x.cpu] Examination succeed
Info : starting gdb server for stm32f4x.cpu on 0
Info : Listening on port 39021 for gdb connections
    TargetName         Type       Endian TapName            State       
--  ------------------ ---------- ------ ------------------ ------------
 0* stm32f4x.cpu       hla_target little stm32f4x.cpu       unknown
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
[stm32f4x.cpu] halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x08000c40 msp: 0x20000200
Info : device id = 0x20016419
Info : flash size = 2048 KiB
Info : Dual Bank 2048 kiB STM32F42x/43x/469/479 found
auto erase enabled
wrote 16384 bytes from file /home/maribu/Repos/software/RIOT/master/tests/periph/timer/bin/nucleo-f429zi/tests_timer.elf in 0.657561s (24.332 KiB/s)
verified 13728 bytes in 0.160629s (83.461 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/ttyACM0" -b "115200" --no-reconnect --noprefix --no-repeat-command-on-empty-line 
Twisted not available, please install it if you want to use pyterm's JSON capabilities
Connect to serial port /dev/ttyACM0
Welcome to pyterm!
Type '/exit' to exit.
READY
s
START
main(): This is RIOT! (Version: 2024.04-devel-654-g189bb2-cpu/msp430/timer-query)

Test for peripheral TIMERs

Available timers: 2

TIMER 0
=======

  - supported frequencies:
    0: 90000000
    1: 45000000
    2: 30000000
    ....
    65535: 1373
  - Calling timer_init(0, 90000000)
    initialization successful
  - timer_stop(0): stopped
  - timer_set(0, 0, 450000)
    Successfully set timeout 450000 for channel 0
  - timer_set(0, 1, 900000)
    Successfully set timeout 900000 for channel 1
  - timer_set(0, 2, 1350000)
    Successfully set timeout 1350000 for channel 2
  - timer_set(0, 3, 1800000)
    Successfully set timeout 1800000 for channel 3
  - timer_start(0)
  - Results:
    - channel 0 fired at SW count    52941      - init:    52941
    - channel 1 fired at SW count   105867      - diff:    52926
    - channel 2 fired at SW count   158798      - diff:    52931
    - channel 3 fired at SW count   211728      - diff:    52930
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)
  - Calling timer_init(0, 45000000)
    initialization successful
  - timer_stop(0): stopped
  - timer_set(0, 0, 225000)
    Successfully set timeout 225000 for channel 0
  - timer_set(0, 1, 450000)
    Successfully set timeout 450000 for channel 1
  - timer_set(0, 2, 675000)
    Successfully set timeout 675000 for channel 2
  - timer_set(0, 3, 900000)
    Successfully set timeout 900000 for channel 3
  - timer_start(0)
  - Results:
    - channel 0 fired at SW count    52941      - init:    52941
    - channel 1 fired at SW count   105867      - diff:    52926
    - channel 2 fired at SW count   158798      - diff:    52931
    - channel 3 fired at SW count   211728      - diff:    52930
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)
  - Calling timer_init(0, 30000000)
    initialization successful
  - timer_stop(0): stopped
  - timer_set(0, 0, 150000)
    Successfully set timeout 150000 for channel 0
  - timer_set(0, 1, 300000)
    Successfully set timeout 300000 for channel 1
  - timer_set(0, 2, 450000)
    Successfully set timeout 450000 for channel 2
  - timer_set(0, 3, 600000)
    Successfully set timeout 600000 for channel 3
  - timer_start(0)
  - Results:
    - channel 0 fired at SW count    52941      - init:    52941
    - channel 1 fired at SW count   105867      - diff:    52926
    - channel 2 fired at SW count   158798      - diff:    52931
    - channel 3 fired at SW count   211728      - diff:    52930
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)

TIMER 1
=======

  - supported frequencies:
    0: 90000000
    1: 45000000
    2: 30000000
    ....
    65535: 1373
  - Calling timer_init(1, 90000000)
    initialization successful
  - timer_stop(1): stopped
  - timer_set(1, 0, 450000)
    Successfully set timeout 450000 for channel 0
  - timer_set(1, 1, 900000)
    Successfully set timeout 900000 for channel 1
  - timer_set(1, 2, 1350000)
    Successfully set timeout 1350000 for channel 2
  - timer_set(1, 3, 1800000)
    Successfully set timeout 1800000 for channel 3
  - timer_start(1)
  - Results:
    - channel 0 fired at SW count    52941      - init:    52941
    - channel 1 fired at SW count   105868      - diff:    52927
    - channel 2 fired at SW count   158799      - diff:    52931
    - channel 3 fired at SW count   211729      - diff:    52930
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)
  - Calling timer_init(1, 45000000)
    initialization successful
  - timer_stop(1): stopped
  - timer_set(1, 0, 225000)
    Successfully set timeout 225000 for channel 0
  - timer_set(1, 1, 450000)
    Successfully set timeout 450000 for channel 1
  - timer_set(1, 2, 675000)
    Successfully set timeout 675000 for channel 2
  - timer_set(1, 3, 900000)
    Successfully set timeout 900000 for channel 3
  - timer_start(1)
  - Results:
    - channel 0 fired at SW count    52941      - init:    52941
    - channel 1 fired at SW count   105868      - diff:    52927
    - channel 2 fired at SW count   158799      - diff:    52931
    - channel 3 fired at SW count   211729      - diff:    52930
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)
  - Calling timer_init(1, 30000000)
    initialization successful
  - timer_stop(1): stopped
  - timer_set(1, 0, 150000)
    Successfully set timeout 150000 for channel 0
  - timer_set(1, 1, 300000)
    Successfully set timeout 300000 for channel 1
  - timer_set(1, 2, 450000)
    Successfully set timeout 450000 for channel 2
  - timer_set(1, 3, 600000)
    Successfully set timeout 600000 for channel 3
  - timer_start(1)
  - Results:
    - channel 0 fired at SW count    52941      - init:    52941
    - channel 1 fired at SW count   105868      - diff:    52927
    - channel 2 fired at SW count   158798      - diff:    52930
    - channel 3 fired at SW count   211728      - diff:    52930
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)

TEST SUCCEEDED

make: Leaving directory '/home/maribu/Repos/software/RIOT/master/tests/periph/timer'

and

$ make BOARD=olimex-msp430-h2618 -C tests/periph/timer flash test
make: Entering directory '/home/maribu/Repos/software/RIOT/master/tests/periph/timer'
Building application "tests_timer" for "olimex-msp430-h2618" with CPU "msp430".

"make" -C /home/maribu/Repos/software/RIOT/master/boards/common/init
"make" -C /home/maribu/Repos/software/RIOT/master/boards/olimex-msp430-h2618
"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/msp430
"make" -C /home/maribu/Repos/software/RIOT/master/cpu/msp430/periph
"make" -C /home/maribu/Repos/software/RIOT/master/drivers
"make" -C /home/maribu/Repos/software/RIOT/master/drivers/periph_common
"make" -C /home/maribu/Repos/software/RIOT/master/sys
"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/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
"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
  13679	   266	  1202	 15147	  3b2b	/home/maribu/Repos/software/RIOT/master/tests/periph/timer/bin/olimex-msp430-h2618/tests_timer.elf
[INFO] mspdebug binary not found - building it from source now
[INFO] mspdebug requires readline and libusb-compat headers to build
CC= CFLAGS= make -C /home/maribu/Repos/software/RIOT/master/dist/tools/mspdebug
[INFO] mspdebug binary successfully built!
/home/maribu/Repos/software/RIOT/master/dist/tools/mspdebug/mspdebug -j --expect-id "MSP430F2618" olimex "prog /home/maribu/Repos/software/RIOT/master/tests/periph/timer/bin/olimex-msp430-h2618/tests_timer.hex"
MSPDebug version 0.25 - debugging tool for MSP430 MCUs
Copyright (C) 2009-2017 Daniel Beer <[email protected]>
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Chip info database from MSP430.dll v3.15.0.1 Copyright (C) 2013 TI, Inc.

Resetting Olimex command processor...
Initializing FET...
FET protocol version is 20000007
Set Vcc: 3000 mV
Configured for JTAG (2)
Sending reset...
Using Olimex identification procedure
Device ID: 0xf26f
  Code start address: 0x3100
  Code size         : 118528 byte = 115 kb
  RAM  start address: 0x200
  RAM  end   address: 0x9ff
  RAM  size         : 2048 byte = 2 kb
Device: MSP430F2618
Number of breakpoints: 8
fet: FET returned error code 34 (Not supported by selected interface or interface is not initialized)
fet: warning: message C_IDENT3 failed
fet: FET returned NAK
warning: device does not support power profiling
Device: MSP430F2618
Erasing...
Programming...
Writing 1635 bytes at 3100...
Writing 4096 bytes at 3764...
Writing 4096 bytes at 4764...
Writing 4096 bytes at 5764...
Writing   10 bytes at 6764...
Writing    2 bytes at ffe2...
Writing    4 bytes at fff0...
Writing    4 bytes at fff8...
Writing    2 bytes at fffe...
Done, 13945 bytes total
r
/home/maribu/Repos/software/RIOT/master/dist/tools/pyterm/pyterm -p "/dev/ttyUSB0" -b "115200" --no-reconnect --noprefix --no-repeat-command-on-empty-line 
Twisted not available, please install it if you want to use pyterm's JSON capabilities
Connect to serial port /dev/ttyUSB0
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: 2024.04-devel-654-g189bb2-cpu/msp430/timer-query)

Test for peripheral TIMERs

Available timers: 2

TIMER 0
=======

  - supported frequencies:
    0: 16035840
    1: 8017920
    2: 4008960
    ....
    3: 2004480
  - Calling timer_init(0, 16035840)
    initialization successful
  - timer_stop(0): stopped
  - timer_set(0, 0, 14643)
    Successfully set timeout 14643 for channel 0
  - timer_set(0, 1, 29286)
    Successfully set timeout 29286 for channel 1
  - timer_set(0, 2, 43929)
    Successfully set timeout 43929 for channel 2
  - timer_start(0)
  - Results:
    - channel 0 fired at SW count      366      - init:      366
    - channel 1 fired at SW count      729      - diff:      363
    - channel 2 fired at SW count     1089      - diff:      360
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)
  - Calling timer_init(0, 8017920)
    initialization successful
  - timer_stop(0): stopped
  - timer_set(0, 0, 40089)
    Successfully set timeout 40089 for channel 0
  - timer_set(0, 1, 14642)
    Successfully set timeout 14642 for channel 1
  - timer_set(0, 2, 54731)
    Successfully set timeout 54731 for channel 2
  - timer_start(0)
  - Results:
    - channel 0 fired at SW count     1999      - init:     1999
    - channel 1 fired at SW count      732      - diff: 4294966029
    - channel 2 fired at SW count     2728      - diff:     1996
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)
  - Calling timer_init(0, 4008960)
    initialization successful
  - timer_stop(0): stopped
  - timer_set(0, 0, 20044)
    Successfully set timeout 20044 for channel 0
  - timer_set(0, 1, 40088)
    Successfully set timeout 40088 for channel 1
  - timer_set(0, 2, 60132)
    Successfully set timeout 60132 for channel 2
  - timer_start(0)
  - Results:
    - channel 0 fired at SW count     2005      - init:     2005
    - channel 1 fired at SW count     4005      - diff:     2000
    - channel 2 fired at SW count     6004      - diff:     1999
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)

TIMER 1
=======

  - supported frequencies:
    0: 32768
    1: 16384
    2: 8192
    ....
    3: 4096
  - Calling timer_init(1, 32768)
    initialization successful
  - timer_stop(1): stopped
  - timer_set(1, 0, 163)
    Successfully set timeout 163 for channel 0
  - timer_set(1, 1, 326)
    Successfully set timeout 326 for channel 1
  - timer_set(1, 2, 489)
    Successfully set timeout 489 for channel 2
  - timer_set(1, 3, 652)
    Successfully set timeout 652 for channel 3
  - timer_set(1, 4, 815)
    Successfully set timeout 815 for channel 4
  - timer_set(1, 5, 978)
    Successfully set timeout 978 for channel 5
  - timer_set(1, 6, 1141)
    Successfully set timeout 1141 for channel 6
  - timer_start(1)
  - Results:
    - channel 0 fired at SW count     1992      - init:     1992
    - channel 1 fired at SW count     3982      - diff:     1990
    - channel 2 fired at SW count     5971      - diff:     1989
    - channel 3 fired at SW count     7960      - diff:     1989
    - channel 4 fired at SW count     9949      - diff:     1989
    - channel 5 fired at SW count    11938      - diff:     1989
    - channel 6 fired at SW count    13927      - diff:     1989
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)
  - Calling timer_init(1, 16384)
    initialization successful
  - timer_stop(1): stopped
  - timer_set(1, 0, 81)
    Successfully set timeout 81 for channel 0
  - timer_set(1, 1, 162)
    Successfully set timeout 162 for channel 1
  - timer_set(1, 2, 243)
    Successfully set timeout 243 for channel 2
  - timer_set(1, 3, 324)
    Successfully set timeout 324 for channel 3
  - timer_set(1, 4, 405)
    Successfully set timeout 405 for channel 4
  - timer_set(1, 5, 486)
    Successfully set timeout 486 for channel 5
  - timer_set(1, 6, 567)
    Successfully set timeout 567 for channel 6
  - timer_start(1)
  - Results:
    - channel 0 fired at SW count     1965      - init:     1965
    - channel 1 fired at SW count     3943      - diff:     1978
    - channel 2 fired at SW count     5919      - diff:     1976
    - channel 3 fired at SW count     7896      - diff:     1977
    - channel 4 fired at SW count     9872      - diff:     1976
    - channel 5 fired at SW count    11848      - diff:     1976
    - channel 6 fired at SW count    13825      - diff:     1977
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)
  - Calling timer_init(1, 8192)
    initialization successful
  - timer_stop(1): stopped
  - timer_set(1, 0, 40)
    Successfully set timeout 40 for channel 0
  - timer_set(1, 1, 80)
    Successfully set timeout 80 for channel 1
  - timer_set(1, 2, 120)
    Successfully set timeout 120 for channel 2
  - timer_set(1, 3, 160)
    Successfully set timeout 160 for channel 3
  - timer_set(1, 4, 200)
    Successfully set timeout 200 for channel 4
  - timer_set(1, 5, 240)
    Successfully set timeout 240 for channel 5
  - timer_set(1, 6, 280)
    Successfully set timeout 280 for channel 6
  - timer_start(1)
  - Results:
    - channel 0 fired at SW count     1956      - init:     1956
    - channel 1 fired at SW count     3909      - diff:     1953
    - channel 2 fired at SW count     5861      - diff:     1952
    - channel 3 fired at SW count     7812      - diff:     1951
    - channel 4 fired at SW count     9764      - diff:     1952
    - channel 5 fired at SW count    11716      - diff:     1952
    - channel 6 fired at SW count    13668      - diff:     1952
  - Validating no spurious IRQs are triggered:
    OK (no spurious IRQs)

TEST SUCCEEDED

make: Leaving directory '/home/maribu/Repos/software/RIOT/master/tests/periph/timer'

and finally a failure in the test when the fix is reverted:

$ git revert -n 5adf1f1a28ba990e5b115608024f70930a6e821a
$ make BOARD=olimex-msp430-h2618 -C tests/periph/timer flash test
make: Entering directory '/home/maribu/Repos/software/RIOT/master/tests/periph/timer'
Building application "tests_timer" for "olimex-msp430-h2618" with CPU "msp430".

"make" -C /home/maribu/Repos/software/RIOT/master/boards/common/init
"make" -C /home/maribu/Repos/software/RIOT/master/boards/olimex-msp430-h2618
"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/msp430
"make" -C /home/maribu/Repos/software/RIOT/master/cpu/msp430/periph
"make" -C /home/maribu/Repos/software/RIOT/master/drivers
"make" -C /home/maribu/Repos/software/RIOT/master/drivers/periph_common
"make" -C /home/maribu/Repos/software/RIOT/master/sys
"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/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
"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
  13655	   266	  1202	 15123	  3b13	/home/maribu/Repos/software/RIOT/master/tests/periph/timer/bin/olimex-msp430-h2618/tests_timer.elf
[INFO] mspdebug binary not found - building it from source now
[INFO] mspdebug requires readline and libusb-compat headers to build
CC= CFLAGS= make -C /home/maribu/Repos/software/RIOT/master/dist/tools/mspdebug
[INFO] mspdebug binary successfully built!
/home/maribu/Repos/software/RIOT/master/dist/tools/mspdebug/mspdebug -j --expect-id "MSP430F2618" olimex "prog /home/maribu/Repos/software/RIOT/master/tests/periph/timer/bin/olimex-msp430-h2618/tests_timer.hex"
MSPDebug version 0.25 - debugging tool for MSP430 MCUs
Copyright (C) 2009-2017 Daniel Beer <[email protected]>
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Chip info database from MSP430.dll v3.15.0.1 Copyright (C) 2013 TI, Inc.

Resetting Olimex command processor...
Initializing FET...
FET protocol version is 20000007
Set Vcc: 3000 mV
Configured for JTAG (2)
Sending reset...
Using Olimex identification procedure
Device ID: 0xf26f
  Code start address: 0x3100
  Code size         : 118528 byte = 115 kb
  RAM  start address: 0x200
  RAM  end   address: 0x9ff
  RAM  size         : 2048 byte = 2 kb
Device: MSP430F2618
Number of breakpoints: 8
fet: FET returned error code 34 (Not supported by selected interface or interface is not initialized)
fet: warning: message C_IDENT3 failed
fet: FET returned NAK
warning: device does not support power profiling
Device: MSP430F2618
Erasing...
Programming...
Writing 1635 bytes at 3100...
Writing 4096 bytes at 3764...
Writing 4096 bytes at 4764...
Writing 4082 bytes at 5764...
Writing    2 bytes at ffe2...
Writing    4 bytes at fff0...
Writing    4 bytes at fff8...
Writing    2 bytes at fffe...
Done, 13921 bytes total
r
/home/maribu/Repos/software/RIOT/master/dist/tools/pyterm/pyterm -p "/dev/ttyUSB0" -b "115200" --no-reconnect --noprefix --no-repeat-command-on-empty-line 
Twisted not available, please install it if you want to use pyterm's JSON capabilities
Connect to serial port /dev/ttyUSB0
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: 2024.04-devel-654-g189bb2-cpu/msp430/timer-query)

Test for peripheral TIMERs

Available timers: 2

TIMER 0
=======

  - supported frequencies:
    0: 16035840
    1: 8017920
    2: 4008960
    ....
    3: 2004480
tests/periph/timer/main.c:253 => failed condition
*** RIOT kernel panic:
CONDITION FAILED.

*** halted.

Timeout in expect script at "child.expect('TEST SUCCEEDED')" (tests/periph/timer/tests/01-run.py:18)

make: *** [/home/maribu/Repos/software/RIOT/master/makefiles/tests/tests.inc.mk:26: test] Error 1
make: Leaving directory '/home/maribu/Repos/software/RIOT/master/tests/periph/timer'

Merged via the queue into RIOT-OS:master with commit 680c5aa Apr 15, 2024
30 checks passed
@maribu maribu deleted the cpu/msp430/timer-query branch April 15, 2024 13:24
@maribu
Copy link
Member Author

maribu commented Apr 15, 2024

Thx :)

@maribu
Copy link
Member Author

maribu commented Apr 15, 2024

Backport provided in #20580

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: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer Platform: MSP Platform: This PR/issue effects MSP-based platforms Process: needs backport Integration Process: The PR is required to be backported to a release or feature branch Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants