RIOT icon indicating copy to clipboard operation
RIOT copied to clipboard

cpu/stm32: allow arbitrary I2C clocks

Open maribu opened this issue 2 years ago • 4 comments

Contribution description

This allows arbitrary I2C clock frequencies for MCUs using the i2c_2.c I2C implementation.

Testing procedure

I2C should still work and still have the correct clock frequency.

Issues/PRs references

None

maribu avatar Dec 12 '23 08:12 maribu

This needed a rebase to resolve merge conflicts. I guess I'd rather test the I2C peripheral again on a board of each flavor to avoid any regressions.

maribu avatar Mar 18 '24 14:03 maribu

nucleo-f446re: All OK
make BOARD=nucleo-f446re flash test-with-config 
Building application "tests_selftest_shield" for "nucleo-f446re" 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-f446re
"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/pcf857x
"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/tiny_strerror
"make" -C /home/maribu/Repos/software/RIOT/master/sys/tsrb
   text	  data	   bss	   dec	   hex	filename
  19580	   128	  2780	 22488	  57d8	/home/maribu/Repos/software/RIOT/master/tests/periph/selftest_shield/bin/nucleo-f446re/tests_selftest_shield.elf
/home/maribu/Repos/software/RIOT/master/dist/tools/openocd/openocd.sh flash /home/maribu/Repos/software/RIOT/master/tests/periph/selftest_shield/bin/nucleo-f446re/tests_selftest_shield.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 V2J40M27 (API v2) VID:PID 0483:374B
Info : Target voltage: 3.254318
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 44431 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: 0x08001750 msp: 0x20000200
Info : device id = 0x10006421
Info : flash size = 512 KiB
auto erase enabled
wrote 32768 bytes from file /home/maribu/Repos/software/RIOT/master/tests/periph/selftest_shield/bin/nucleo-f446re/tests_selftest_shield.elf in 1.126048s (28.418 KiB/s)
verified 19708 bytes in 0.228899s (84.081 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.
�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: 2024.04-devel-390-gae3c35-cpu/stm32/periph_i2c/clock_speed)
self-testing peripheral drivers
===============================
Starting test for GPIO at tests/periph/selftest_shield/main.c:346
[OK]
Starting test for GPIO at tests/periph/selftest_shield/main.c:368
[OK]
Starting test for GPIO at tests/periph/selftest_shield/main.c:398
[OK]
Starting test for GPIO at tests/periph/selftest_shield/main.c:428
[OK]
Starting test for GPIO at tests/periph/selftest_shield/main.c:454
(skipped)
Starting test for GPIO-IRQ at tests/periph/selftest_shield/main.c:501
[OK]
Starting test for GPIO-IRQ at tests/periph/selftest_shield/main.c:564
[OK]
Starting test for GPIO-IRQ at tests/periph/selftest_shield/main.c:627
[OK]
Starting test for I2C at tests/periph/selftest_shield/main.c:701
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for ADC at tests/periph/selftest_shield/main.c:1027
[OK]


ALL TESTS SUCCEEDED
nucleo-f303re: I2C OK (but ADC broken, pre-existing & unrelated)
make BOARD=nucleo-f303re flash test-with-config                  
Building application "tests_selftest_shield" for "nucleo-f303re" 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-f303re
"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/pcf857x
"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/frac
"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/tiny_strerror
"make" -C /home/maribu/Repos/software/RIOT/master/sys/tsrb
"make" -C /home/maribu/Repos/software/RIOT/master/sys/ztimer
   text	  data	   bss	   dec	   hex	filename
  20996	   168	  2884	 24048	  5df0	/home/maribu/Repos/software/RIOT/master/tests/periph/selftest_shield/bin/nucleo-f303re/tests_selftest_shield.elf
/home/maribu/Repos/software/RIOT/master/dist/tools/openocd/openocd.sh flash /home/maribu/Repos/software/RIOT/master/tests/periph/selftest_shield/bin/nucleo-f303re/tests_selftest_shield.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 1000 kHz
Info : STLINK V2J40M27 (API v2) VID:PID 0483:374B
Info : Target voltage: 3.270573
Info : [stm32f3x.cpu] Cortex-M4 r0p1 processor detected
Info : [stm32f3x.cpu] target has 6 breakpoints, 4 watchpoints
Info : [stm32f3x.cpu] Examination succeed
Info : starting gdb server for stm32f3x.cpu on 0
Info : Listening on port 36921 for gdb connections
    TargetName         Type       Endian TapName            State       
--  ------------------ ---------- ------ ------------------ ------------
 0* stm32f3x.cpu       hla_target little stm32f3x.cpu       unknown
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
[stm32f3x.cpu] halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x080017b0 msp: 0x20000200
Info : device id = 0x10036446
Info : flash size = 512 KiB
Warn : Adding extra erase range, 0x080052ac .. 0x080057ff
auto erase enabled
wrote 21164 bytes from file /home/maribu/Repos/software/RIOT/master/tests/periph/selftest_shield/bin/nucleo-f303re/tests_selftest_shield.elf in 1.200352s (17.218 KiB/s)
verified 21164 bytes in 0.395465s (52.262 KiB/s)
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 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 
Connect to serial port /dev/ttyACM0
Welcome to pyterm!
Type '/exit' to exit.
!1)�1)䷚х��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: 2024.04-devel-390-gae3c35-cpu/stm32/periph_i2c/clock_speed)
self-testing peripheral drivers
===============================
Starting test for GPIO at tests/periph/selftest_shield/main.c:346
[OK]
Starting test for GPIO at tests/periph/selftest_shield/main.c:368
[OK]
Starting test for GPIO at tests/periph/selftest_shield/main.c:398
[OK]
Starting test for GPIO at tests/periph/selftest_shield/main.c:428
[OK]
Starting test for GPIO at tests/periph/selftest_shield/main.c:454
(skipped)
Starting test for GPIO-IRQ at tests/periph/selftest_shield/main.c:501
[OK]
Starting test for GPIO-IRQ at tests/periph/selftest_shield/main.c:564
[OK]
Starting test for GPIO-IRQ at tests/periph/selftest_shield/main.c:627
[OK]
Starting test for I2C at tests/periph/selftest_shield/main.c:701
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for ADC at tests/periph/selftest_shield/main.c:1027
FAILURE in tests/periph/selftest_shield/main.c:1042
410 <= 389 <= 614: FAILED
FAILURE in tests/periph/selftest_shield/main.c:1042
474 <= 441 <= 678: FAILED
FAILURE in tests/periph/selftest_shield/main.c:1042
538 <= 492 <= 742: FAILED
FAILURE in tests/periph/selftest_shield/main.c:1042
602 <= 547 <= 806: FAILED
FAILURE in tests/periph/selftest_shield/main.c:1042
666 <= 598 <= 870: FAILED
FAILURE in tests/periph/selftest_shield/main.c:1042
730 <= 652 <= 934: FAILED
FAILURE in tests/periph/selftest_shield/main.c:1042
794 <= 711 <= 998: FAILED
FAILURE in tests/periph/selftest_shield/main.c:1042
858 <= 772 <= 1023: FAILED
[FAILED]


SOME TESTS FAILED
nucleo-l073rz: I2C OK (but ADC broken, preexisting and unrelated)
make BOARD=nucleo-l073rz flash test-with-config
Building application "tests_selftest_shield" for "nucleo-l073rz" 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-l073rz
"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/pcf857x
"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/tiny_strerror
"make" -C /home/maribu/Repos/software/RIOT/master/sys/tsrb
   text	  data	   bss	   dec	   hex	filename
  18736	   124	  2752	 21612	  546c	/home/maribu/Repos/software/RIOT/master/tests/periph/selftest_shield/bin/nucleo-l073rz/tests_selftest_shield.elf
/home/maribu/Repos/software/RIOT/master/dist/tools/openocd/openocd.sh flash /home/maribu/Repos/software/RIOT/master/tests/periph/selftest_shield/bin/nucleo-l073rz/tests_selftest_shield.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 300 kHz
Info : STLINK V2J33M25 (API v2) VID:PID 0483:374B
Info : Target voltage: 3.263559
Info : [stm32l0.cpu] Cortex-M0+ r0p1 processor detected
Info : [stm32l0.cpu] target has 4 breakpoints, 2 watchpoints
Info : [stm32l0.cpu] Examination succeed
Info : starting gdb server for stm32l0.cpu on 0
Info : Listening on port 45045 for gdb connections
    TargetName         Type       Endian TapName            State       
--  ------------------ ---------- ------ ------------------ ------------
 0* stm32l0.cpu        hla_target little stm32l0.cpu        unknown
Info : Unable to match requested speed 300 kHz, using 240 kHz
Info : Unable to match requested speed 300 kHz, using 240 kHz
[stm32l0.cpu] halted due to debug-request, current mode: Thread 
xPSR: 0xf1000000 pc: 0x080016a8 msp: 0x20000200
Info : Device: STM32L0xx (Cat.5)
Info : STM32L flash has dual banks. Bank (0) size is 96kb, base address is 0x8000000
auto erase enabled
wrote 20480 bytes from file /home/maribu/Repos/software/RIOT/master/tests/periph/selftest_shield/bin/nucleo-l073rz/tests_selftest_shield.elf in 4.700909s (4.254 KiB/s)
verified 18860 bytes in 0.828857s (22.221 KiB/s)
Info : Unable to match requested speed 300 kHz, using 240 kHz
Info : Unable to match requested speed 300 kHz, using 240 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 
Connect to serial port /dev/ttyACM0
Welcome to pyterm!
Type '/exit' to exit.
READY
s
START
main(): This is RIOT! (Version: 2024.04-devel-390-g5d54c-cpu/stm32/periph_i2c/clock_speed)
self-testing peripheral drivers
===============================
Starting test for GPIO at tests/periph/selftest_shield/main.c:346
[OK]
Starting test for GPIO at tests/periph/selftest_shield/main.c:368
[OK]
Starting test for GPIO at tests/periph/selftest_shield/main.c:398
[OK]
Starting test for GPIO at tests/periph/selftest_shield/main.c:428
[OK]
Starting test for GPIO at tests/periph/selftest_shield/main.c:454
(skipped)
Starting test for GPIO-IRQ at tests/periph/selftest_shield/main.c:501
[OK]
Starting test for GPIO-IRQ at tests/periph/selftest_shield/main.c:564
[OK]
Starting test for GPIO-IRQ at tests/periph/selftest_shield/main.c:627
[OK]
Starting test for I2C at tests/periph/selftest_shield/main.c:701
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for ADC at tests/periph/selftest_shield/main.c:1027
FAILURE in tests/periph/selftest_shield/main.c:1042
0 <= 213 <= 166: FAILED
FAILURE in tests/periph/selftest_shield/main.c:1042
26 <= 426 <= 230: FAILED
FAILURE in tests/periph/selftest_shield/main.c:1042
90 <= 676 <= 294: FAILED
FAILURE in tests/periph/selftest_shield/main.c:1042
154 <= 864 <= 358: FAILED
FAILURE in tests/periph/selftest_shield/main.c:1042
218 <= 1110 <= 422: FAILED
FAILURE in tests/periph/selftest_shield/main.c:1042
282 <= 1368 <= 486: FAILED
FAILURE in tests/periph/selftest_shield/main.c:1042
346 <= 1644 <= 550: FAILED
FAILURE in tests/periph/selftest_shield/main.c:1042
410 <= 1793 <= 614: FAILED
FAILURE in tests/periph/selftest_shield/main.c:1042
474 <= 2042 <= 678: FAILED
FAILURE in tests/periph/selftest_shield/main.c:1042
538 <= 2300 <= 742: FAILED
FAILURE in tests/periph/selftest_shield/main.c:1042
602 <= 2584 <= 806: FAILED
FAILURE in tests/periph/selftest_shield/main.c:1042
666 <= 2849 <= 870: FAILED
FAILURE in tests/periph/selftest_shield/main.c:1042
730 <= 3127 <= 934: FAILED
FAILURE in tests/periph/selftest_shield/main.c:1042
794 <= 3425 <= 998: FAILED
FAILURE in tests/periph/selftest_shield/main.c:1042
858 <= 3738 <= 1023: FAILED
[FAILED]


SOME TESTS FAILED
nucleo-l152re: hardfalting in test, also in master
make BOARD=nucleo-l152re test-with-config      
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 
Connect to serial port /dev/ttyACM0
Welcome to pyterm!
Type '/exit' to exit.

Context before hardfault:
r
nucleo-f072rb: All OK
make BOARD=nucleo-f072rb flash test-with-config
Building application "tests_selftest_shield" for "nucleo-f072rb" 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-f072rb
"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/pcf857x
"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/tiny_strerror
"make" -C /home/maribu/Repos/software/RIOT/master/sys/tsrb
   text	  data	   bss	   dec	   hex	filename
  18424	   124	  2768	 21316	  5344	/home/maribu/Repos/software/RIOT/master/tests/periph/selftest_shield/bin/nucleo-f072rb/tests_selftest_shield.elf
/home/maribu/Repos/software/RIOT/master/dist/tools/openocd/openocd.sh flash /home/maribu/Repos/software/RIOT/master/tests/periph/selftest_shield/bin/nucleo-f072rb/tests_selftest_shield.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 1000 kHz
Info : STLINK V2J29M18 (API v2) VID:PID 0483:374B
Info : Target voltage: 3.257819
Info : [stm32f0x.cpu] Cortex-M0 r0p0 processor detected
Info : [stm32f0x.cpu] target has 4 breakpoints, 2 watchpoints
Info : [stm32f0x.cpu] Examination succeed
Info : starting gdb server for stm32f0x.cpu on 0
Info : Listening on port 41393 for gdb connections
    TargetName         Type       Endian TapName            State       
--  ------------------ ---------- ------ ------------------ ------------
 0* stm32f0x.cpu       hla_target little stm32f0x.cpu       unknown
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
[stm32f0x.cpu] halted due to debug-request, current mode: Thread 
xPSR: 0xc1000000 pc: 0x080016a0 msp: 0x20000200
Info : device id = 0x20016448
Info : flash size = 128 KiB
Warn : Adding extra erase range, 0x08004874 .. 0x08004fff
auto erase enabled
wrote 18548 bytes from file /home/maribu/Repos/software/RIOT/master/tests/periph/selftest_shield/bin/nucleo-f072rb/tests_selftest_shield.elf in 0.851435s (21.274 KiB/s)
verified 18548 bytes in 0.255563s (70.876 KiB/s)
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 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 
Connect to serial port /dev/ttyACM0
Welcome to pyterm!
Type '/exit' to exit.
EADY
r
READY
s
START
main(): This is RIOT! (Version: 2024.04-devel-390-g8a196-cpu/stm32/periph_i2c/clock_speed)
self-testing peripheral drivers
===============================
Starting test for GPIO at tests/periph/selftest_shield/main.c:346
[OK]
Starting test for GPIO at tests/periph/selftest_shield/main.c:368
[OK]
Starting test for GPIO at tests/periph/selftest_shield/main.c:398
[OK]
Starting test for GPIO at tests/periph/selftest_shield/main.c:428
[OK]
Starting test for GPIO at tests/periph/selftest_shield/main.c:454
(skipped)
Starting test for GPIO-IRQ at tests/periph/selftest_shield/main.c:501
[OK]
Starting test for GPIO-IRQ at tests/periph/selftest_shield/main.c:564
[OK]
Starting test for GPIO-IRQ at tests/periph/selftest_shield/main.c:627
[OK]
Starting test for I2C at tests/periph/selftest_shield/main.c:701
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for ADC at tests/periph/selftest_shield/main.c:1027
[OK]


ALL TESTS SUCCEEDED
nucleo-f103rb: All OK
make BOARD=nucleo-f103rb flash test-with-config
Building application "tests_selftest_shield" for "nucleo-f103rb" 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-f103rb
"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/pcf857x
"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/tiny_strerror
"make" -C /home/maribu/Repos/software/RIOT/master/sys/tsrb
   text	  data	   bss	   dec	   hex	filename
  18048	   124	  2772	 20944	  51d0	/home/maribu/Repos/software/RIOT/master/tests/periph/selftest_shield/bin/nucleo-f103rb/tests_selftest_shield.elf
/home/maribu/Repos/software/RIOT/master/dist/tools/openocd/openocd.sh flash /home/maribu/Repos/software/RIOT/master/tests/periph/selftest_shield/bin/nucleo-f103rb/tests_selftest_shield.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 1000 kHz
Info : STLINK V2J29M18 (API v2) VID:PID 0483:374B
Info : Target voltage: 3.247800
Info : [stm32f1x.cpu] Cortex-M3 r1p1 processor detected
Info : [stm32f1x.cpu] target has 6 breakpoints, 4 watchpoints
Info : [stm32f1x.cpu] Examination succeed
Info : starting gdb server for stm32f1x.cpu on 0
Info : Listening on port 35319 for gdb connections
    TargetName         Type       Endian TapName            State       
--  ------------------ ---------- ------ ------------------ ------------
 0* stm32f1x.cpu       hla_target little stm32f1x.cpu       unknown
[stm32f1x.cpu] halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x080014e0 msp: 0x20000200
Info : device id = 0x20036410
Info : flash size = 128 KiB
Warn : Adding extra erase range, 0x080046fc .. 0x080047ff
auto erase enabled
wrote 18172 bytes from file /home/maribu/Repos/software/RIOT/master/tests/periph/selftest_shield/bin/nucleo-f103rb/tests_selftest_shield.elf in 1.047988s (16.933 KiB/s)
verified 18172 bytes in 0.294181s (60.324 KiB/s)
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 
Connect to serial port /dev/ttyACM0
Welcome to pyterm!
Type '/exit' to exit.
�est, 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
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: 2024.04-devel-390-g8a196-cpu/stm32/periph_i2c/clock_speed)
self-testing peripheral drivers
===============================
Starting test for GPIO at tests/periph/selftest_shield/main.c:346
[OK]
Starting test for GPIO at tests/periph/selftest_shield/main.c:368
[OK]
Starting test for GPIO at tests/periph/selftest_shield/main.c:398
[OK]
Starting test for GPIO at tests/periph/selftest_shield/main.c:428
(skipped)
Starting test for GPIO at tests/periph/selftest_shield/main.c:454
(skipped)
Starting test for GPIO-IRQ at tests/periph/selftest_shield/main.c:501
[OK]
Starting test for GPIO-IRQ at tests/periph/selftest_shield/main.c:564
[OK]
Starting test for GPIO-IRQ at tests/periph/selftest_shield/main.c:627
[OK]
Starting test for I2C at tests/periph/selftest_shield/main.c:701
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]
Starting test for SPI at tests/periph/selftest_shield/main.c:829
[OK]


ALL TESTS SUCCEEDED

maribu avatar Mar 18 '24 16:03 maribu

So we can drop the WIP tag?

benpicco avatar Mar 20 '24 15:03 benpicco

Murdock results

:heavy_check_mark: PASSED

2da7b1291f99b3c214d24d36f992f9b39e6a9d1b cpu/stm32: allow arbitrary I2C clocks for i2c_2.c

Success Failures Total Runtime
10044 0 10045 13m:17s

Artifacts

riot-ci avatar Mar 20 '24 16:03 riot-ci