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

pkg/fatfs, shell: enable RTC support if rtt_rtc is used #17912

Merged
merged 2 commits into from
May 31, 2022

Conversation

benpicco
Copy link
Contributor

Contribution description

rtt_rtc implements the same interface as periph_rtc, so enable the rtc shell command and RTC support in fatfs if it's used.

Testing procedure

Issues/PRs references

@github-actions github-actions bot added Area: pkg Area: External package ports Area: sys Area: System labels Apr 11, 2022
@benpicco benpicco added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Apr 12, 2022
@kfessel
Copy link
Contributor

kfessel commented Apr 12, 2022

Change seems fine, but lets wait for murdock

@kfessel kfessel added Reviewed: 1-fundamentals The fundamentals of the PR were reviewed according to the maintainer guidelines Reviewed: 2-code-design The code design of the PR was reviewed according to the maintainer guidelines Reviewed: 4-code-style The adherence to coding conventions by the PR were reviewed according to the maintainer guidelines Reviewed: 5-documentation The documentation details of the PR were reviewed according to the maintainer guidelines labels Apr 12, 2022
@kfessel
Copy link
Contributor

kfessel commented Apr 13, 2022

i tested the shell part of this PR

examples/default$ BOARD=nucleo-f767zi USEMODULE="rtt_rtc rtt_cmd" make flash term

(removed the optional feature periph-rtt and the networking things from the makefile first)

While this PR seems to do what it is supposed to do the rtt_rtc might not be in good enough shape or i am testing it wrong.

Twisted not available, please install it if you want to use pyterm's JSON capabilities
2022-04-13 13:51:15,036 # Connect to serial port /dev/ttyACM0
Welcome to pyterm!
Type '/exit' to exit.
help
2022-04-13 13:51:19,045 # help
2022-04-13 13:51:19,048 # Command              Description
2022-04-13 13:51:19,051 # ---------------------------------------
2022-04-13 13:51:19,054 # reboot               Reboot the node
2022-04-13 13:51:19,059 # version              Prints current RIOT_VERSION
2022-04-13 13:51:19,064 # pm                   interact with layered PM subsystem
2022-04-13 13:51:19,069 # ps                   Prints information about running threads.
2022-04-13 13:51:19,074 # rtc                  control RTC peripheral interface
2022-04-13 13:51:19,079 # rtt                  control RTC peripheral interface
2022-04-13 13:51:19,085 # saul                 interact with sensors and actuators using SAUL
> rtc gettime
2022-04-13 13:51:27,886 # rtc gettime
2022-04-13 13:51:27,887 # 2089-12-24 05:17:00
> rtc gettime
2022-04-13 13:51:39,982 # rtc gettime
2022-04-13 13:51:39,983 # 2089-12-24 05:17:00
> rtc gettime
2022-04-13 13:51:41,181 # rtc gettime
2022-04-13 13:51:41,183 # 2089-12-24 05:16:59
> rtc gettime
2022-04-13 13:51:42,173 # rtc gettime
2022-04-13 13:51:42,175 # 2089-12-24 05:17:00
> rtc gettime
2022-04-13 13:51:43,150 # rtc gettime
2022-04-13 13:51:43,152 # 2089-12-24 05:16:59
> rtc gettime
2022-04-13 13:51:44,134 # rtc gettime
2022-04-13 13:51:44,135 # 2089-12-24 05:17:00
> rtc gettime
2022-04-13 13:51:45,054 # rtc gettime
2022-04-13 13:51:45,056 # 2089-12-24 05:16:59
> rtc gettime
2022-04-13 13:51:46,222 # rtc gettime
2022-04-13 13:51:46,223 # 2089-12-24 05:17:00
> rtc gettime
2022-04-13 13:51:48,525 # rtc gettime
2022-04-13 13:51:48,528 # 2089-12-24 05:16:59
> rtc gettime
2022-04-13 13:51:49,549 # rtc gettime
2022-04-13 13:51:49,551 # 2089-12-24 05:17:00
> rtc gettime
2022-04-13 13:51:50,326 # rtc gettime
2022-04-13 13:51:50,327 # 2089-12-24 05:16:59
> rtc gettime
2022-04-13 13:51:51,174 # rtc gettime
2022-04-13 13:51:51,176 # 2089-12-24 05:16:59
> rtc gettime
2022-04-13 13:51:51,933 # rtc gettime
2022-04-13 13:51:51,935 # 2089-12-24 05:17:00
> rtc gettime
2022-04-13 13:51:52,765 # rtc gettime
2022-04-13 13:51:52,767 # 2089-12-24 05:16:59
> rtc gettime
2022-04-13 13:51:53,894 # rtc gettime
2022-04-13 13:51:53,896 # 2089-12-24 05:17:00
> rtt get
2022-04-13 13:52:02,261 # rtt get
2022-04-13 13:52:02,262 # 46592
> rtt get
2022-04-13 13:52:03,590 # rtt get
2022-04-13 13:52:03,591 # 24609
> rtt get
2022-04-13 13:52:04,358 # rtt get
2022-04-13 13:52:04,359 # 49746
> rtt get
2022-04-13 13:52:05,069 # rtt get
2022-04-13 13:52:05,070 # 7542
> rtt get
2022-04-13 13:52:05,797 # rtt get
2022-04-13 13:52:05,798 # 31388
> rtt get
2022-04-13 13:52:06,445 # rtt get
2022-04-13 13:52:06,445 # 52620
> rtt get
2022-04-13 13:52:07,085 # rtt get
2022-04-13 13:52:07,086 # 8059
> rtt 
2022-04-13 13:52:16,181 # rtt
2022-04-13 13:52:16,184 # usage: rtt <command> [arguments]
2022-04-13 13:52:16,185 # commands:
2022-04-13 13:52:16,187 #       init            init the interface
2022-04-13 13:52:16,190 #       poweron         power the interface on
2022-04-13 13:52:16,193 #       poweroff        power the interface off
2022-04-13 13:52:16,197 #       clearoverflow   deactivate the overflow interrupt
2022-04-13 13:52:16,200 #       setoverflow     set the overflow interrupt
2022-04-13 13:52:16,203 #       clearalarm      deactivate the alarm
2022-04-13 13:52:16,207 #       getalarm        print the current alarm counter value
2022-04-13 13:52:16,213 #       setalarm <val>  set an alarm for the specified counter value
2022-04-13 13:52:16,216 #       get             print the current counter value
2022-04-13 13:52:16,219 #       set             set the current counter value
rtc settime 2022-04-04 10:10:00
2022-04-13 13:53:29,352 # rtc settime 2022-04-04 10:10:00
> 2022-04-13 13:53:30,353 # 0x8000247
2022-04-13 13:53:30,355 # *** RIOT kernel panic:
2022-04-13 13:53:30,357 # FAILED ASSERTION.
2022-04-13 13:53:30,357 # 
2022-04-13 13:53:30,369 #       pid | I�N�}�g▒���Tt��Yo�O?�������}��q�D������}DZN�?/�������k��6�awc�����1v�*��W!�F�#Ʌ�u��uK[�g�fcw�w��_�Yg`
2022-04-13 13:53:30,373 # Stack pointer corrupted, reset to top of stack
2022-04-13 13:53:30,374 # FSR/FAR:
2022-04-13 13:53:30,376 #  CFSR: 0x00040092
2022-04-13 13:53:30,377 #  HFSR: 0x40000000
2022-04-13 13:53:30,379 #  DFSR: 0x0000000b
2022-04-13 13:53:30,380 #  AFSR: 0x00000000
2022-04-13 13:53:30,382 # MMFAR: 0x20000000
2022-04-13 13:53:30,382 # Misc
2022-04-13 13:53:30,384 # EXC_RET: 0xffffffff

@kfessel
Copy link
Contributor

kfessel commented Apr 19, 2022

I did run the tests/periph_rtt test on that board and it succeeded

@benpicco benpicco 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 May 30, 2022
@benpicco
Copy link
Contributor Author

I did run the tests/periph_rtt test on that board and it succeeded

On which board?

Mind you that this only enables certain shell commands when the module is used, it does not change anything about the code.

@kfessel
Copy link
Contributor

kfessel commented May 31, 2022

I did run the tests/periph_rtt test on that board and it succeeded
On which board?

BOARD=nucleo-f767zi

Copy link
Contributor

@kfessel kfessel left a comment

Choose a reason for hiding this comment

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

i tested that shell part benpicco tested all

@benpicco benpicco merged commit b94dd60 into RIOT-OS:master May 31, 2022
@benpicco benpicco deleted the pkg/fatfs-rtt_rtc branch May 31, 2022 08:30
@chrysn chrysn added this to the Release 2022.07 milestone Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: pkg Area: External package ports Area: sys Area: System CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Reviewed: 1-fundamentals The fundamentals of the PR were reviewed according to the maintainer guidelines Reviewed: 2-code-design The code design of the PR was reviewed according to the maintainer guidelines Reviewed: 4-code-style The adherence to coding conventions by the PR were reviewed according to the maintainer guidelines Reviewed: 5-documentation The documentation details of the PR were reviewed according to the maintainer guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants