[riot-notifications] [RIOT-OS/RIOT] cpu/rpx0xx: add periph timer (#16627)

fabian18 notifications at github.com
Thu Jul 8 15:06:49 CEST 2021


<!--
The RIOT community cares a lot about code quality.
Therefore, before describing what your contribution is about, we would like
you to make sure that your modifications are compliant with the RIOT
coding conventions, see https://github.com/RIOT-OS/RIOT/wiki/Coding-conventions.
-->

### Contribution description
This PR contributes a `periph_timer` driver implementation for the RP2040 MCU.

<!--
Put here the description of your contribution:
- describe which part(s) of RIOT is (are) involved
- if it's a bug fix, describe the bug that it solves and how it is solved
- you can also give more information to reviewers about how to test your changes
-->


### Testing procedure

tests/periph_timer_periodic:

2021-07-08 14:57:32,736 # START
2021-07-08 14:57:32,743 # main(): This is RIOT! (Version: 2021.10-devel-27-g732dc-cpu_rp2040_periph_timer)
2021-07-08 14:57:32,743 # 
2021-07-08 14:57:32,746 # Running Timer 0 at 1000000 Hz.
2021-07-08 14:57:32,749 # One counter cycle is 25000 ticks or 25 ms
2021-07-08 14:57:32,752 # Will print 'tick' every cycle.
2021-07-08 14:57:32,752 # 
2021-07-08 14:57:32,752 # TEST START
2021-07-08 14:57:32,779 # [0] tick
2021-07-08 14:57:32,803 # [0] tick
2021-07-08 14:57:32,830 # [0] tick
2021-07-08 14:57:32,856 # [0] tick
2021-07-08 14:57:32,881 # [0] tick
2021-07-08 14:57:32,907 # [0] tick
2021-07-08 14:57:32,933 # [0] tick
2021-07-08 14:57:32,958 # [0] tick
2021-07-08 14:57:32,984 # [0] tick
2021-07-08 14:57:33,010 # [0] tick
2021-07-08 14:57:33,036 # [0] tick
2021-07-08 14:57:33,061 # [0] tick
2021-07-08 14:57:33,061 # 
2021-07-08 14:57:33,062 # Cycles:
2021-07-08 14:57:33,063 # channel 0 = 12        [OK]
2021-07-08 14:57:33,065 # TEST SUCCEEDED

tests/periph_timer:

2021-07-08 14:58:18,177 # START
2021-07-08 14:58:18,184 # main(): This is RIOT! (Version: 2021.10-devel-27-g732dc-cpu_rp2040_periph_timer)
2021-07-08 14:58:18,185 # 
2021-07-08 14:58:18,187 # Test for peripheral TIMERs
2021-07-08 14:58:18,187 # 
2021-07-08 14:58:18,189 # Available timers: 1
2021-07-08 14:58:18,189 # 
2021-07-08 14:58:18,190 # Testing TIMER_0:
2021-07-08 14:58:18,193 # TIMER_0: initialization successful
2021-07-08 14:58:18,195 # TIMER_0: stopped
2021-07-08 14:58:18,197 # TIMER_0: set channel 0 to 5000
2021-07-08 14:58:18,200 # TIMER_0: set channel 1 to 10000
2021-07-08 14:58:18,203 # TIMER_0: set channel 2 to 15000
2021-07-08 14:58:18,206 # TIMER_0: set channel 3 to 20000
2021-07-08 14:58:18,207 # TIMER_0: starting
2021-07-08 14:58:18,232 # TIMER_0: channel 0 fired at SW count    59902 - init:    59902
2021-07-08 14:58:18,237 # TIMER_0: channel 1 fired at SW count   119653 - diff:    59751
2021-07-08 14:58:18,243 # TIMER_0: channel 2 fired at SW count   179554 - diff:    59901
2021-07-08 14:58:18,248 # TIMER_0: channel 3 fired at SW count   239461 - diff:    59907
2021-07-08 14:58:18,249 # 
2021-07-08 14:58:18,250 # TEST SUCCEEDED

tests/periph_timer_short_relative_set:

2021-07-08 14:59:29,875 # START
2021-07-08 14:59:29,882 # main(): This is RIOT! (Version: 2021.10-devel-27-g732dc-cpu_rp2040_periph_timer)
2021-07-08 14:59:29,882 # 
2021-07-08 14:59:29,886 # Test for peripheral TIMER short timer_set()
2021-07-08 14:59:29,886 # 
2021-07-08 14:59:29,891 # This test tries timer_set() with decreasing intervals down to 0.
2021-07-08 14:59:29,898 # You should see lines like 'interval <n> ok', followed by a success message.
2021-07-08 14:59:29,902 # On failure, this test prints an error message.
2021-07-08 14:59:29,902 # 
2021-07-08 14:59:29,905 # testing periph_timer 0, freq 1000000
2021-07-08 14:59:29,906 # interval 99 ok
2021-07-08 14:59:29,908 # interval 98 ok
2021-07-08 14:59:29,909 # interval 97 ok
2021-07-08 14:59:29,910 # interval 96 ok
2021-07-08 14:59:29,912 # interval 95 ok
2021-07-08 14:59:29,913 # interval 94 ok
2021-07-08 14:59:29,914 # interval 93 ok
2021-07-08 14:59:29,916 # interval 92 ok
2021-07-08 14:59:29,917 # interval 91 ok
2021-07-08 14:59:29,918 # interval 90 ok
2021-07-08 14:59:29,920 # interval 89 ok
2021-07-08 14:59:29,921 # interval 88 ok
2021-07-08 14:59:29,922 # interval 87 ok
2021-07-08 14:59:29,923 # interval 86 ok
2021-07-08 14:59:29,925 # interval 85 ok
2021-07-08 14:59:29,927 # interval 84 ok
2021-07-08 14:59:29,927 # interval 83 ok
2021-07-08 14:59:29,929 # interval 82 ok
2021-07-08 14:59:29,930 # interval 81 ok
2021-07-08 14:59:29,931 # interval 80 ok
2021-07-08 14:59:29,933 # interval 79 ok
2021-07-08 14:59:29,934 # interval 78 ok
2021-07-08 14:59:29,935 # interval 77 ok
2021-07-08 14:59:29,937 # interval 76 ok
2021-07-08 14:59:29,938 # interval 75 ok
2021-07-08 14:59:29,939 # interval 74 ok
2021-07-08 14:59:29,940 # interval 73 ok
2021-07-08 14:59:29,942 # interval 72 ok
2021-07-08 14:59:29,943 # interval 71 ok
2021-07-08 14:59:29,945 # interval 70 ok
2021-07-08 14:59:29,946 # interval 69 ok
2021-07-08 14:59:29,947 # interval 68 ok
2021-07-08 14:59:29,948 # interval 67 ok
2021-07-08 14:59:29,950 # interval 66 ok
2021-07-08 14:59:29,951 # interval 65 ok
2021-07-08 14:59:29,952 # interval 64 ok
2021-07-08 14:59:29,953 # interval 63 ok
2021-07-08 14:59:29,955 # interval 62 ok
2021-07-08 14:59:29,956 # interval 61 ok
2021-07-08 14:59:29,957 # interval 60 ok
2021-07-08 14:59:29,959 # interval 59 ok
2021-07-08 14:59:29,960 # interval 58 ok
2021-07-08 14:59:29,961 # interval 57 ok
2021-07-08 14:59:29,963 # interval 56 ok
2021-07-08 14:59:29,965 # interval 55 ok
2021-07-08 14:59:29,966 # interval 54 ok
2021-07-08 14:59:29,966 # interval 53 ok
2021-07-08 14:59:29,968 # interval 52 ok
2021-07-08 14:59:29,969 # interval 51 ok
2021-07-08 14:59:29,970 # interval 50 ok
2021-07-08 14:59:29,972 # interval 49 ok
2021-07-08 14:59:29,973 # interval 48 ok
2021-07-08 14:59:29,974 # interval 47 ok
2021-07-08 14:59:29,976 # interval 46 ok
2021-07-08 14:59:29,977 # interval 45 ok
2021-07-08 14:59:29,978 # interval 44 ok
2021-07-08 14:59:29,980 # interval 43 ok
2021-07-08 14:59:29,981 # interval 42 ok
2021-07-08 14:59:29,982 # interval 41 ok
2021-07-08 14:59:29,983 # interval 40 ok
2021-07-08 14:59:29,985 # interval 39 ok
2021-07-08 14:59:29,986 # interval 38 ok
2021-07-08 14:59:29,987 # interval 37 ok
2021-07-08 14:59:29,989 # interval 36 ok
2021-07-08 14:59:29,990 # interval 35 ok
2021-07-08 14:59:29,992 # interval 34 ok
2021-07-08 14:59:29,993 # interval 33 ok
2021-07-08 14:59:29,994 # interval 32 ok
2021-07-08 14:59:29,995 # interval 31 ok
2021-07-08 14:59:29,996 # interval 30 ok
2021-07-08 14:59:29,998 # interval 29 ok
2021-07-08 14:59:29,999 # interval 28 ok
2021-07-08 14:59:30,000 # interval 27 ok
2021-07-08 14:59:30,002 # interval 26 ok
2021-07-08 14:59:30,003 # interval 25 ok
2021-07-08 14:59:30,004 # interval 24 ok
2021-07-08 14:59:30,006 # interval 23 ok
2021-07-08 14:59:30,008 # interval 22 ok
2021-07-08 14:59:30,009 # interval 21 ok
2021-07-08 14:59:30,010 # interval 20 ok
2021-07-08 14:59:30,011 # interval 19 ok
2021-07-08 14:59:30,012 # interval 18 ok
2021-07-08 14:59:30,013 # interval 17 ok
2021-07-08 14:59:30,015 # interval 16 ok
2021-07-08 14:59:30,016 # interval 15 ok
2021-07-08 14:59:30,017 # interval 14 ok
2021-07-08 14:59:30,019 # interval 13 ok
2021-07-08 14:59:30,020 # interval 12 ok
2021-07-08 14:59:30,021 # interval 11 ok
2021-07-08 14:59:30,022 # interval 10 ok
2021-07-08 14:59:30,024 # interval 9 ok
2021-07-08 14:59:30,025 # interval 8 ok
2021-07-08 14:59:30,026 # interval 7 ok
2021-07-08 14:59:30,027 # interval 6 ok
2021-07-08 14:59:30,029 # interval 5 ok
2021-07-08 14:59:30,030 # interval 4 ok
2021-07-08 14:59:30,031 # interval 3 ok
2021-07-08 14:59:30,032 # interval 2 ok
2021-07-08 14:59:30,033 # interval 1 ok
2021-07-08 14:59:30,035 # interval 0 ok
2021-07-08 14:59:30,035 # 
2021-07-08 14:59:30,036 # TEST SUCCEEDED
<!--
Details steps to test your contribution:
- which test/example to compile for which board and is there a 'test' command
- how to know that it was not working/available in master
- the expected success test output
-->


### Issues/PRs references

<!--
Examples: Fixes #1234. See also #5678. Depends on PR #9876.

Please use keywords (e.g., fixes, resolve) with the links to the issues you
resolved, this way they will be automatically closed when your pull request
is merged. See https://help.github.com/articles/closing-issues-using-keywords/.
-->

You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/16627

-- Commit Summary --

  * cpu/rpx0xx: add support for the RP2040 MCU
  * cpu/rpx0xx: implement periph_uart
  * boards/rpi-pico: add the Raspberry Pi Pico
  * fixup! cpu/rpx0xx: add support for the RP2040 MCU
  * fixup! boards/rpi-pico: add the Raspberry Pi Pico
  * fixup! boards/rpi-pico: add the Raspberry Pi Pico
  * fixup! cpu/rpx0xx: add support for the RP2040 MCU
  * fixup! boards/rpi-pico: add the Raspberry Pi Pico
  * fixup! cpu/rpx0xx: add support for the RP2040 MCU
  * fixup! cpu/rpx0xx: add support for the RP2040 MCU
  * fixup! cpu/rpx0xx: implement periph_uart
  * fixup! cpu/rpx0xx: add support for the RP2040 MCU
  * fixup! cpu/rpx0xx: add support for the RP2040 MCU
  * fixup! cpu/rpx0xx: add support for the RP2040 MCU
  * fixup! cpu/rpx0xx: add support for the RP2040 MCU
  * fixup! boards/rpi-pico: add the Raspberry Pi Pico
  * fixup! cpu/rpx0xx: add support for the RP2040 MCU
  * fixup! cpu/rpx0xx: implement periph_uart
  * fixup! cpu/rpx0xx: add support for the RP2040 MCU
  * fixup! cpu/rpx0xx: add support for the RP2040 MCU
  * fixup! boards/rpi-pico: add the Raspberry Pi Pico
  * fixup! cpu/rpx0xx: implement periph_uart
  * fixup! cpu/rpx0xx: add support for the RP2040 MCU
  * fixup! boards/rpi-pico: add the Raspberry Pi Pico
  * fixup! cpu/rpx0xx: implement periph_uart
  * fixup! cpu/rpx0xx: implement periph_uart
  * cpu/rpx0xx: implement periph timer

-- File Changes --

    A boards/rpi-pico/Kconfig (17)
    A boards/rpi-pico/Makefile (3)
    A boards/rpi-pico/Makefile.dep (3)
    A boards/rpi-pico/Makefile.features (5)
    A boards/rpi-pico/Makefile.include (2)
    A boards/rpi-pico/board.c (29)
    A boards/rpi-pico/dist/openocd.cfg (3)
    A boards/rpi-pico/doc.txt (142)
    A boards/rpi-pico/include/board.h (52)
    A boards/rpi-pico/include/gpio_params.h (48)
    A boards/rpi-pico/include/periph_conf.h (86)
    A cpu/rpx0xx/Kconfig (33)
    A cpu/rpx0xx/Makefile (5)
    A cpu/rpx0xx/Makefile.dep (1)
    A cpu/rpx0xx/Makefile.features (8)
    A cpu/rpx0xx/Makefile.include (19)
    A cpu/rpx0xx/boot2_w25q080_padded_checksummed.S (23)
    A cpu/rpx0xx/clock.c (179)
    A cpu/rpx0xx/cpu.c (96)
    A cpu/rpx0xx/doc.txt (9)
    A cpu/rpx0xx/include/.gitignore (1)
    A cpu/rpx0xx/include/cpu_conf.h (47)
    A cpu/rpx0xx/include/io_reg.h (138)
    A cpu/rpx0xx/include/periph_cpu.h (694)
    A cpu/rpx0xx/include/vendor/RP2040.h (29410)
    A cpu/rpx0xx/include/vendor/system_RP2040.h (67)
    A cpu/rpx0xx/ldscripts/RP2040.ld (46)
    A cpu/rpx0xx/periph/Makefile (1)
    A cpu/rpx0xx/periph/gpio.c (222)
    A cpu/rpx0xx/periph/timer.c (241)
    A cpu/rpx0xx/periph/uart.c (205)
    A cpu/rpx0xx/pll.c (119)
    A cpu/rpx0xx/rosc.c (57)
    A cpu/rpx0xx/vectors.c (95)
    A cpu/rpx0xx/vendor/boot_stage2/.gitignore (1)
    A cpu/rpx0xx/vendor/boot_stage2/Makefile (33)
    A cpu/rpx0xx/vendor/boot_stage2/README.md (5)
    A cpu/rpx0xx/vendor/boot_stage2/boot2_at25sf128a.S (285)
    A cpu/rpx0xx/vendor/boot_stage2/boot2_generic_03h.S (103)
    A cpu/rpx0xx/vendor/boot_stage2/boot2_is25lp080.S (262)
    A cpu/rpx0xx/vendor/boot_stage2/boot2_usb_blinky.S (53)
    A cpu/rpx0xx/vendor/boot_stage2/boot2_w25q080.S (287)
    A cpu/rpx0xx/vendor/boot_stage2/boot2_w25x10cl.S (196)
    A cpu/rpx0xx/vendor/boot_stage2/boot_stage2.ld (13)
    A cpu/rpx0xx/vendor/boot_stage2/compile_time_choice.S (19)
    A cpu/rpx0xx/vendor/boot_stage2/config.h (92)
    A cpu/rpx0xx/vendor/boot_stage2/include/boot2_helpers/exit_from_boot2.S (28)
    A cpu/rpx0xx/vendor/boot_stage2/include/boot2_helpers/read_flash_sreg.S (30)
    A cpu/rpx0xx/vendor/boot_stage2/include/boot2_helpers/wait_ssi_ready.S (26)
    A cpu/rpx0xx/vendor/boot_stage2/include/hardware/platform_defs.h (55)
    A cpu/rpx0xx/vendor/boot_stage2/include/hardware/regs/addressmap.h (74)
    A cpu/rpx0xx/vendor/boot_stage2/include/hardware/regs/m0plus.h (1149)
    A cpu/rpx0xx/vendor/boot_stage2/include/hardware/regs/pads_qspi.h (454)
    A cpu/rpx0xx/vendor/boot_stage2/include/hardware/regs/ssi.h (809)
    A cpu/rpx0xx/vendor/boot_stage2/include/pico/asm_helper.S (38)
    A cpu/rpx0xx/vendor/boot_stage2/include/pico/config.h (85)
    A cpu/rpx0xx/vendor/boot_stage2/include/pico/platform.h (180)
    A cpu/rpx0xx/vendor/boot_stage2/pad_checksum (55)
    A cpu/rpx0xx/vendor/boot_stage2/read_flash_sreg.S (30)
    A cpu/rpx0xx/xosc.c (48)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/16627.patch
https://github.com/RIOT-OS/RIOT/pull/16627.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/16627
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210708/18612e1c/attachment-0001.htm>


More information about the notifications mailing list