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

SPI broken for STM32L1 #21546

Closed
Mani-Sadhasivam opened this issue Dec 20, 2019 · 3 comments · Fixed by #21722
Closed

SPI broken for STM32L1 #21546

Mani-Sadhasivam opened this issue Dec 20, 2019 · 3 comments · Fixed by #21722
Assignees
Labels
area: SPI SPI bus bug The issue is a bug, or the PR is fixing a bug platform: STM32 ST Micro STM32 priority: medium Medium impact/importance bug

Comments

@Mani-Sadhasivam
Copy link
Member

Describe the bug
With the current Zephyr master, SPI is not working as expected on STM32L1 based 96boards Wistrio board. Some of the bytes of the received data seems to be dropping.

To Reproduce
Reproducible with the LoRa PR #18998 which uses SPI for communicating to the Radio.

The issue seems to be with this commit: 2ce8fa1
To be more precise, setting xfer_16 flag manually to false fixes the issue, which means the problem is with sending/receiving 16bits of data.

@Mani-Sadhasivam Mani-Sadhasivam added the bug The issue is a bug, or the PR is fixing a bug label Dec 20, 2019
@Mani-Sadhasivam
Copy link
Member Author

@psidhu Since you are the actual author of the commit, could you please look into this?

@erwango
Copy link
Member

erwango commented Dec 22, 2019

@Mani-Sadhasivam, thanks for reporting. This is partly my bad, not enough tests have been made for this behavior to be made used by default.
@psidhu, can you push a change to set this behavior available only under specific Kconfig flag (default n)?

@psidhu
Copy link
Contributor

psidhu commented Jan 2, 2020

@erwango Sure, though it may take me a small bit of time to get to.

erwango added a commit to erwango/zephyr that referenced this issue Jan 6, 2020
Behavior of sending 16bits in 8bits mode when possible is not working
with all slaves, as it appears.
should be
It should be optional and not be active by default.

Fixes zephyrproject-rtos#21546
Fixes zephyrproject-rtos#21679

Signed-off-by: Erwan Gouriou <[email protected]>
erwango added a commit to erwango/zephyr that referenced this issue Jan 6, 2020
@galak galak added area: SPI SPI bus platform: STM32 ST Micro STM32 priority: medium Medium impact/importance bug labels Jan 7, 2020
@jhedberg jhedberg added the has-pr label Jan 7, 2020
jhedberg pushed a commit that referenced this issue Jan 7, 2020
…ossible"

This reverts commit 2ce8fa1.

Fixes #21546
Fixes #21679

Signed-off-by: Erwan Gouriou <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: SPI SPI bus bug The issue is a bug, or the PR is fixing a bug platform: STM32 ST Micro STM32 priority: medium Medium impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants