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/nrf{53,9160}: add periph_rtt support #19804

Merged
merged 4 commits into from
Jul 7, 2023

Conversation

dylad
Copy link
Member

@dylad dylad commented Jul 6, 2023

Contribution description

This PR enables support for periph_rtt on both nRF9160 and nRF53.
This PR is based on #19803

I was only able to test on nrf5340dk-app as I don't have access to any nrf9160-based board.

Here is test/periph/rtt output for reference on nrf5340dk-app:

Testing procedure

flash tests/periph/rtt on nrf9160dk or nrf5340dk-app and check the results.

s
2023-07-06 16:11:16,471 # START
2023-07-06 16:11:16,479 # main(): This is RIOT! (Version: 2023.07-devel-765-g02c65-cpu/nrf53/add_rtt_support)
2023-07-06 16:11:16,480 # 
2023-07-06 16:11:16,482 # RIOT RTT low-level driver test
2023-07-06 16:11:16,483 # RTT configuration:
2023-07-06 16:11:16,485 # RTT_MAX_VALUE: 0x00ffffff
2023-07-06 16:11:16,487 # RTT_FREQUENCY: 1024
2023-07-06 16:11:16,487 # 
2023-07-06 16:11:16,494 # Testing the tick conversion (with rounding if RTT_FREQUENCY is not power of 2)
2023-07-06 16:11:16,498 # Trying to convert 1 to seconds and back
2023-07-06 16:11:16,501 # Trying to convert 256 to seconds and back
2023-07-06 16:11:16,505 # Trying to convert 65536 to seconds and back
2023-07-06 16:11:16,509 # Trying to convert 16777216 to seconds and back
2023-07-06 16:11:16,514 # Trying to convert 2147483648 to seconds and back
2023-07-06 16:11:16,514 # All ok
2023-07-06 16:11:16,514 # 
2023-07-06 16:11:16,517 # Initializing the RTT driver
2023-07-06 16:11:16,835 # This test will now display 'Hello' every 5 seconds
2023-07-06 16:11:16,835 # 
2023-07-06 16:11:16,836 # RTT now: 4
2023-07-06 16:11:16,840 # Setting initial alarm to now + 5 s (5124)
2023-07-06 16:11:16,841 # rtt_get_alarm() PASSED
2023-07-06 16:11:16,846 # Done setting up the RTT, wait for many Hellos
2023-07-06 16:11:16,852 # { "threads": [{ "name": "main", "stack_size": 1536, "stack_used": 404 }]}
2023-07-06 16:11:21,833 # Hello
2023-07-06 16:11:26,831 # Hello
2023-07-06 16:11:31,830 # Hello
2023-07-06 16:11:36,828 # Hello
2023-07-06 16:11:41,826 # Hello
2023-07-06 16:11:46,825 # Hello
2023-07-06 16:11:51,823 # Hello
2023-07-06 16:11:56,821 # Hello
2023-07-06 16:12:01,821 # Hello
2023-07-06 16:12:06,819 # Hello
2023-07-06 16:12:11,817 # Hello
2023-07-06 16:12:16,815 # Hello
2023-07-06 16:12:21,813 # Hello
2023-07-06 16:12:26,811 # Hello

Issues/PRs references

based on #19803

@dylad dylad added the State: waiting for other PR State: The PR requires another PR to be merged first label Jul 6, 2023
@github-actions github-actions bot added Platform: ARM Platform: This PR/issue effects ARM-based platforms Area: boards Area: Board ports Area: cpu Area: CPU/MCU ports Area: Kconfig Area: Kconfig integration labels Jul 6, 2023
@dylad dylad removed the State: waiting for other PR State: The PR requires another PR to be merged first label Jul 7, 2023
@dylad dylad force-pushed the cpu/nrf53/add_rtt_support branch from d158ddb to 54631e2 Compare July 7, 2023 07:20
@dylad
Copy link
Member Author

dylad commented Jul 7, 2023

Rebased. No more waiting for any PRs.

Output of tests/periph/rtt for nrf5340dk-app:

2023-07-07 09:19:13,936 # Help: Press s to start test, r to print it is ready
s
2023-07-07 09:19:16,324 # START
2023-07-07 09:19:16,331 # main(): This is RIOT! (Version: 2023.07-devel-789-g54631-cpu/nrf53/add_rtt_support)
2023-07-07 09:19:16,331 # 
2023-07-07 09:19:16,334 # RIOT RTT low-level driver test
2023-07-07 09:19:16,335 # RTT configuration:
2023-07-07 09:19:16,338 # RTT_MAX_VALUE: 0x00ffffff
2023-07-07 09:19:16,339 # RTT_FREQUENCY: 1024
2023-07-07 09:19:16,339 # 
2023-07-07 09:19:16,346 # Testing the tick conversion (with rounding if RTT_FREQUENCY is not power of 2)
2023-07-07 09:19:16,350 # Trying to convert 1 to seconds and back
2023-07-07 09:19:16,353 # Trying to convert 256 to seconds and back
2023-07-07 09:19:16,357 # Trying to convert 65536 to seconds and back
2023-07-07 09:19:16,361 # Trying to convert 16777216 to seconds and back
2023-07-07 09:19:16,366 # Trying to convert 2147483648 to seconds and back
2023-07-07 09:19:16,366 # All ok
2023-07-07 09:19:16,366 # 
2023-07-07 09:19:16,369 # Initializing the RTT driver
2023-07-07 09:19:16,690 # This test will now display 'Hello' every 5 seconds
2023-07-07 09:19:16,690 # 
2023-07-07 09:19:16,691 # RTT now: 4
2023-07-07 09:19:16,694 # Setting initial alarm to now + 5 s (5124)
2023-07-07 09:19:16,696 # rtt_get_alarm() PASSED
2023-07-07 09:19:16,700 # Done setting up the RTT, wait for many Hellos
2023-07-07 09:19:16,707 # { "threads": [{ "name": "main", "stack_size": 1536, "stack_used": 404 }]}
2023-07-07 09:19:21,688 # Hello
2023-07-07 09:19:26,686 # Hello
2023-07-07 09:19:31,685 # Hello
2023-07-07 09:19:36,683 # Hello

@dylad dylad added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Jul 7, 2023
@dylad dylad force-pushed the cpu/nrf53/add_rtt_support branch from 54631e2 to f9c5571 Compare July 7, 2023 07:24
@bergzand bergzand added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Jul 7, 2023
@riot-ci
Copy link

riot-ci commented Jul 7, 2023

Murdock results

✔️ PASSED

263e993 cpu/nrf53: setup XL1/XL2 pins for using external 32K osc if needed

Success Failures Total Runtime
6935 0 6936 09m:55s

Artifacts

Copy link
Contributor

@benpicco benpicco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please squash

@dylad dylad force-pushed the cpu/nrf53/add_rtt_support branch from 5108636 to 263e993 Compare July 7, 2023 11:05
@benpicco
Copy link
Contributor

benpicco commented Jul 7, 2023

bors merge

@bors
Copy link
Contributor

bors bot commented Jul 7, 2023

Already running a review

@bors
Copy link
Contributor

bors bot commented Jul 7, 2023

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot merged commit 8707548 into RIOT-OS:master Jul 7, 2023
@dylad
Copy link
Member Author

dylad commented Jul 8, 2023

Thanks !

@dylad dylad deleted the cpu/nrf53/add_rtt_support branch July 8, 2023 13:33
@benpicco benpicco added this to the Release 2023.07 milestone Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: boards Area: Board ports 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants