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 bidirection mode support #493

Open
showier-drastic opened this issue Aug 11, 2024 · 1 comment
Open

SPI bidirection mode support #493

showier-drastic opened this issue Aug 11, 2024 · 1 comment

Comments

@showier-drastic
Copy link

When interfacing with single wire half-duplex SPI devices such as the TLE5012 magnetic sensor, we should enable bidirection mode as shown in "25.3.4 Configuring the SPI for half-duplex communication" of STM32F1 reference manual. Mainly, BIDIMODE bit of CR1 should be set high, and BIDIOE bit should be set according to transfer direction. Is it possible for the HAL to support this?

@burrbull
Copy link
Member

In f4xx-hal it is done using advanced BIDI generic marker. See https://github.com/stm32-rs/stm32f4xx-hal/blob/910163d4d0e2b64091e15a72667fb1273e49a1c2/src/spi.rs#L172

You could improve API making similar PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants