Request to revise I2S section of HAL document. (UM1725)
Hello,
In Section 36. I2S Generic Driver of HAL document (UM1725), I found an incorrect or misleading explanation.
In the explanation of HAL_I2S_Transmit, there is a "notes" below.
-----------------
HAL_I2S_Transmit (I2S_HandleTypeDef * hi2s, uint16_t * pData, uint16_t Size, uint32_t Timeout)
Notes: When a 16-bit data frame or a 16-bit data frame extended is selected during the I2S configuration phase, the Size parameter means the number of 16-bit data length in the transaction
and when a 24-bit data frame or a 32-bit data
frame is selected the Size parameter means the number of 16-bit data length.
-----------------
(Same explanation is shown many times in the source code of stm32f4xx_hal_i2s.c.)
However, Code is implemented as below.
if ((tmpreg_cfgr == I2S_DATAFORMAT_24B) || (tmpreg_cfgr == I2S_DATAFORMAT_32B))
{
hi2s->TxXferSize = (Size << 1U);
hi2s->TxXferCount = (Size << 1U);
}
else
{
hi2s->TxXferSize = Size;
hi2s->TxXferCount = Size;
}That means,
when a 24-bit data frame or a 32-bit data
frame is selected the Size parameter means the number of 16-bit 24/32-bit data length. (or the number of 24/32-bit data)
Original explanation is incorrect or misleading for the beginner like me, please consider to change as above.
Thanks,
