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

I2S: I2S_InitTypeDef doesn't have IOSWP #212

Open
ino-josh opened this issue Apr 7, 2022 · 1 comment
Open

I2S: I2S_InitTypeDef doesn't have IOSWP #212

ino-josh opened this issue Apr 7, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request hal HAL-LL driver-related issue or pull-request. internal bug tracker Issue confirmed and reported into a ticket in the internal bug tracking system
Milestone

Comments

@ino-josh
Copy link

ino-josh commented Apr 7, 2022

Yes, it is just a matter of calling
SET_BIT(hi2s1.Instance->CFG2, SPI_CFG2_IOSWP);
But, this is a matter of exposure.

I wasted hours trying to figure out why RXDR was always zero. I triple checked everything I could possibly think of; looked at everything in the reference manual that could explain what I was doing wrong.
It wasn't until I saw this sentence that I realized the problem:

SDI: Serial Data Input (mapped on the MISO pin) to receive the audio samples in
master, and to transmit the audio sample in slave. 

C'mon now.
Serial Data Input is only an Input when in master mode, it is an output when in slave mode.
Aside from the poor choice of naming, this issue can be somewhat addressed by exposing IOSWP as a part of I2S_InitTypeDef, and adding the wording about SDO/SDI directionality in master vs. slave mode in its comment.
This would at least give some exposure to the problem (and a solution) and prevent others from wasting their time.

@ASELSTM
Copy link
Contributor

ASELSTM commented Apr 11, 2023

ST Internal Reference: 149516

@ASELSTM ASELSTM moved this from To do to In progress in stm32cube-mcu-fw-dashboard Apr 11, 2023
@ASELSTM ASELSTM added internal bug tracker Issue confirmed and reported into a ticket in the internal bug tracking system enhancement New feature or request labels Apr 11, 2023
@ALABSTM ALABSTM added the hal HAL-LL driver-related issue or pull-request. label Mar 1, 2024
@ALABSTM ALABSTM added this to the v1.11.3 milestone Mar 1, 2024
@ALABSTM ALABSTM assigned KRASTM and unassigned ASELSTM Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hal HAL-LL driver-related issue or pull-request. internal bug tracker Issue confirmed and reported into a ticket in the internal bug tracking system
Projects
Development

No branches or pull requests

4 participants