-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Making SPI Loopback Test more generic #5885
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5885 +/- ##
==========================================
+ Coverage 52.88% 52.88% +<.01%
==========================================
Files 412 412
Lines 40274 40274
Branches 7801 7801
==========================================
+ Hits 21297 21298 +1
+ Misses 15761 15760 -1
Partials 3216 3216
Continue to review full report at Codecov.
|
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.
Apart these small cosmetic changes, ok with this !
config SPI_LOOPBACK_CS_GPIO | ||
bool "SPI port CS pin is controlled via a GPIO port during test" | ||
depends on GPIO | ||
default n |
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.
These does seem to be aligned the same
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.
fixed
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.
Could you also add a testcase.yaml file?
@ydamigos I will, but won't get to it this week |
can somebody of the quark devboard users (@SavinayDharmappa that's you, right?) also take a look to verify the changes don't have any (negative) effect on it? |
please rebase and add a testcase.yaml file per this issue #4576. |
I need assistance on the QUARK_SE_C1000_SS here. (@tbursztyka you introduced this test, right?) #elif defined(CONFIG_SOC_QUARK_SE_C1000_SS)
#define SPI_DRV_NAME CONFIG_SPI_0_NAME
#define SPI_SLAVE 0
#define CS_CTRL_GPIO_DRV_NAME CONFIG_GPIO_DW_0_NAME
struct spi_cs_control spi_cs = {
.gpio_pin = 0,
.delay = 0
}; So i guess the test is meant to support the sensor subsystem, but there's no project configuration to actually compile it for QUARK_SE_C1000_SS_DEVBOARD. Tried builduing it and it failed (latest maaster and this pr with some further modifications). Can I "drop" support for this SoC, when changing the test? Right now in the testcase.yaml I need to blacklist QUARK_SE_C1000_SS_DEVBOARD and ARDUINO_101_SSS for sanitycheck to pass localy |
Convert this test to using KConfig instead of conditional compilation. Standard configuration is provided by prj_base.conf and KConfig default values. Remove prj_<board>.conf files. Signed-off-by: Daniel Wagenknecht <[email protected]>
This restores the board specific configurations that were present before moving the test to using KConfig. <board>.conf files from boards subdirectory get merged with prj_base.conf file. Signed-off-by: Daniel Wagenknecht <[email protected]>
Add a testcase.yaml configuration to spi_loopback test to include it into sanitycheck. Fixes #4576 Signed-off-by: Daniel Wagenknecht <[email protected]>
@dwagenk Blacklist them for now on. quark_se is going to switch to native driver by default soonish. If the switch works: I'll un-blacklist this test for relevant boards. |
@tbursztyka OK, that's what I did in last commit. Any other comments? |
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.
Nice changes
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.
Nice changeset, finally my work goes somewhere !
When I wanted to add a configuration for stm32f072b_disco board to SPI loopback test in #5405 @ydamigos pointed out, that most of the configuration options where uneeded (because they already derived from boards KConfig.defconfig). This also applies to most of the existing prf_<board>.conf files for this test.
I modified the test, to not have many (almost) identical conf files and a bunch of conditional compilation in the source, but use kconfig and a prj_base.conf instead.
I'd appreciate comments, especially regarding these aspects:
CMakeLists.txt
selection of conf-file(s) is inspired by @superna9999 approach for the i2c_loopback test (#5224), but slightly modified.
Is this or should this be standardized?
QUARK_SE_C1000_DEVBOARD
These changes schouldn't have any effect when building for this board. Can somebody verify that?
I have no knowledge of this board, so I didn't change it.There was a conditional compilation block relying on CONFIG_SOC_QUARK_SE_C1000_SS, but no project configuration for any of the sensor-subsystem boards that define it. I dropped it.Frequency when running slow spi test
The default SPI frequency for the slow test was set to 500k for STM32 boards and to 128k for all other boards. STM32 can't go that slow.
Would it be OK, to set a default frequency for all boards, that is a little faster (e.g. 256k)?Default now is 500k, boards that had project configuration files for this test and used the 128k speed are configured this way after the Kconfig transition as well.Loglevel
Different boards hat different loglevels set,
maybe that could be harmonized?HarmonizedFixes #4576