-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
stm32 spi driver adds the frame format #40860
stm32 spi driver adds the frame format #40860
Conversation
9fb7037
to
77db82a
Compare
c10aeab
to
61c4705
Compare
stm32F1xx and some of the stm32L1 MCUs do not support the frame format. |
61c4705
to
16d9296
Compare
includes overlay for nucleo_g071rb 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.
otherwise LGTM
drivers/spi/spi_ll_stm32.c
Outdated
#if !defined(CONFIG_SOC_SERIES_STM32F1X) \ | ||
&& (!defined(CONFIG_SOC_SERIES_STM32L1X) || defined(SPI_CR2_FRF)) |
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.
Rather than silently converting property to 0 for these cases, it should rather be notified at binding level,
and then generate an error if an unsupported case is configured
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.
#else
--> raising a compilation error
68e4ccb
to
0fd24f8
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.
LGTM
ab14969
to
99361dd
Compare
99361dd
to
42ca28c
Compare
@tbursztyka |
42ca28c
to
fd0fafe
Compare
rebase on f882d43 Some stm32L1x mcus (cat 1 or 2) do not have the LL function to set the frame format because they do not have the SPI TI mode (their SPI Control reg 2 bit FRF remains at reset value) |
fd0fafe
to
b74d16e
Compare
there isn't a property match between dts and spi_config. in dts it's frame_format, and in in spi_config.operation it's a bit there. Where is the issue? Let me check the bit values, they must be the same (15th bit set or not) |
b74d16e
to
1ff8efe
Compare
1ff8efe
to
0d170d6
Compare
rebase |
0d170d6
to
fe6d76a
Compare
rebase
|
fe6d76a
to
2f0f267
Compare
the stm32 spi drivers now takes the DTS frame_format property from the include/ drivers/spi.h It will be possible to select the Motorola (default) or TI from the DTS entry of the device, when soc supports it, else a run time error is raised. Signed-off-by: Francois Ramu <[email protected]>
The spi node of the led_ws2812 now includes the frame format as defined by the dts bindings spi-device.yaml SPI_FRAME_FORMAT_TI is selected with overlay for target boards. Signed-off-by: Francois Ramu <[email protected]>
2f0f267
to
b6efb3f
Compare
rebase on bb00120 |
Codecov Report
@@ Coverage Diff @@
## main #40860 +/- ##
=======================================
Coverage 51.45% 51.45%
=======================================
Files 616 616
Lines 72357 72357
Branches 16651 16651
=======================================
Hits 37234 37234
Misses 29003 29003
Partials 6120 6120 Continue to review full report at Codecov.
|
this PR includes the support of the Format (TI vs MOTOROLA) of the SPI frame
The spi frame format is a property added to the spi device through an overlay for the led_strip sample on ws2812
$ west build -p auto -b nucleo_l476rg samples/drivers/led_ws2812/
After the new #39990
fixes #38683
Signed-off-by: Francois Ramu [email protected]