Is there a possible bug in function HAL_SPI_Transmit_DMA() (STM32Cube_FW_H7_V1.3.0)?
Hi everyone!
I'm trying to transmit some data using SPI2 on a NUCLEO-H743ZI board (only TX). To do it fast I'm using DMA with HAL_SPI_Transmit_DMA(), but it returns with an error (from line 1465 in stm32h7xx_hal_spi.c):
/* Packing mode management is enabled by the DMA settings */
if (((hspi->Init.DataSize > SPI_DATASIZE_16BIT) && (hspi->hdmarx->Init.MemDataAlignment != DMA_MDATAALIGN_WORD)) || \
((hspi->Init.DataSize > SPI_DATASIZE_8BIT) && ((hspi->hdmarx->Init.MemDataAlignment != DMA_MDATAALIGN_HALFWORD) && \
(hspi->hdmarx->Init.MemDataAlignment != DMA_MDATAALIGN_WORD))))
{
/* Restriction the DMA data received is not allowed in this mode */
errorcode = HAL_ERROR;
__HAL_UNLOCK(hspi);
return errorcode;
}After replacing 'hdmarx' to 'hdmatx' (as I'm only trying to transmit some data and I'm not interested in receiving) it works as it supposed to.
Is this a possible bug, or am I just lucky to make it work somehow (I'm new to HAL)?
