I2S: I2S_InitTypeDef doesn't have IOSWP #212
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
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:
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.
The text was updated successfully, but these errors were encountered: