-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Counter test pca10090 #15623
Counter test pca10090 #15623
Conversation
All checks are passing now. Review history of this comment for details about previous failed status. |
@@ -0,0 +1,7 @@ | |||
CONFIG_COUNTER_TIMER0=y | |||
CONFIG_COUNTER_TIMER0_PRESCALER=4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have the SoC code enable the various timers instead of having to add a board file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure what do you mean. The configuration is different for boards as they have different number of RTCs and TIMERs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is the number of RTCs & TIMERs board specific?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's not board specific though every board here has different soc. Still i don't know what do you mean by Soc code
in:
Can we have the SoC code enable the various timers
I don't want to enable all timers by default in those soc. Only in that test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue I see, here, is that if someone wishes to have this test running for their nrf- board, they still need to add a board.conf. And we have ~20-25 nRF boards in the tree....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the other hand we don't want to enable all counter instances by default. On the other hand, what is the value in testing same driver on different boards with same soc?
However, I see you point and ideally it would be good to have option to add .conf
file for soc that would be applied to any board with given soc (like nrf9160.conf
). @galak, @ioannisg Do we have option like that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have something like that, no. At least not that I am aware of @nordic-krch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@galak @ioannisg can we conclude here?
We have two options:
- enable all instances in soc (i'm against since it's a waste of ram and rom, some you cannot enable like TIMER0 and RTC0 which are used by Bluetooth)
- accept that each board that targets the test requires own board configuration
there is a third option to extend cmake to take conf files from <app>\soc
folder. Then we would have specific option per soc which has value but i looked into cmake framework and it's not straightforward to do because contrary to BOARD
, SoC name is taken from kconfig.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the second option is decent enough to be accepted
6670153
to
1f2643a
Compare
2710272
to
1184ef8
Compare
1184ef8
to
a4c572f
Compare
a4c572f
to
770ba4f
Compare
tests/drivers/counter/counter_basic_api/boards/nrf9160_pca10090.conf
Outdated
Show resolved
Hide resolved
Do we want to have this in 2.0 release? |
770ba4f
to
b61042d
Compare
rebased |
94c1fd0
to
645b257
Compare
@ioannisg can you review? it seems you approved approach taken (#15623 (comment)) |
Will take a look today |
@@ -12,3 +12,4 @@ supported: | |||
- i2c | |||
- pwm | |||
- watchdog | |||
- counter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this could be added also to the _NS board
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to be correct - the two board definitions (S , NS) ideally should be able to execute all counter tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it should but enabling ns board in vanilla zephyr does not may much sense since there is no means to run it without spm.
@@ -0,0 +1,4 @@ | |||
CONFIG_COUNTER_TIMER0=y |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to add license and copyright here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I usually don't see licenses in .conf
files.
@@ -7,6 +7,10 @@ | |||
#include <drivers/counter.h> | |||
#include <ztest.h> | |||
#include <kernel.h> | |||
#ifdef CONFIG_SOC_FAMILY_NRF |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the reason for this inclusion?
Ideally, generic samples/tests wouldn't need platform-specific inclusions, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OH, I see, now, that clock_control_on() is done for nRF SoCS only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, please, add some inline explanation for this, for the ease of reading ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I added some minor comments.
also, I would like to see license header and copyright in all affected files, if possible
645b257
to
f2f0bde
Compare
Any update on this PR? @ioannisg could you take another look? |
f2f0bde
to
2098824
Compare
All checks are passing now. Tip: The bot edits this comment instead of posting a new one, so you can check the comment's history to see earlier messages. |
2098824
to
10ce558
Compare
PR rebased, @ioannisg can you take another look? |
This seems to have been neglected for awhile. I just triggered a Shippable re-run. @ioannisg could you take another look? |
@ioannisg ping |
@nordic-krch could you please rebase? |
Added @nordic-krch as the codeowner. Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
10ce558
to
ee4015f
Compare
rebased to celebrate first anniversary 🎂 |
ee4015f
to
d59cb22
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nordic-krch you need to rename the overlay files according to the new board names
d59cb22
to
db7bd82
Compare
@ioannisg done |
@ioannisg can you take another look? CI fail is unrelated. Would be great to merge it on PR anniversary 😄 |
Or wait for the 2-y anniversary, instead? |
db7bd82
to
d6139e0
Compare
Add board with nrf9160 to counter tests. Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
tests: drivers: counter: Add nrf9160_pca10090 board
Add board with nrf9160 to counter tests.
tests: drivers: counter: Add clock stabilization in test setup for nRF
Xtal LF clock source starts hundreds of milliseconds. When it is
not start, test may fail due to wrong timing. Added pending
on LF clock being start in test setup.