2019-03-21 7:07 PM
In this function call the package mode check wrong buffer alignment,
should check tx buffer not rx buffer.
FYI.
Typhoon
2019-03-22 1:33 AM
Hi @TWu.1
Could you please send me you .ioc file to check the problem.
Best regards.
Nesrine.
2019-03-22 3:13 AM
Dear Sir,
Attached is my IOC, and please check the
HAL SPI Library about HAL_SPI_Transmit_DMA function following is modified and work code
generate code is put in "hdmarx" FYR
/* Packing mode management is enabled by the DMA settings */
if (((hspi->Init.DataSize > SPI_DATASIZE_16BIT) && (hspi->*hdmatx-*>Init.MemDataAlignment
!= DMA_MDATAALIGN_WORD)) || \
((hspi->Init.DataSize > SPI_DATASIZE_8BIT) &&
((hspi->*hdmatx*->Init.MemDataAlignment
!= DMA_MDATAALIGN_HALFWORD) && \
(hspi->*hdmatx*->Init.MemDataAlignment
!= DMA_MDATAALIGN_WORD))))
{
/* Restriction the DMA data received is not allowed in this mode */
errorcode = HAL_ERROR;
__HAL_UNLOCK(hspi);
return errorcode;
}
ST Community 於 2019年3月22日 週五 下�?�4:33寫�?�:
2019-03-22 3:47 AM
Hello @TWu.1 ,
Is the problem faced using STM32H7?
If yes, please refer to this question where the same issue was reported.
Please note that SPI driver will be reworked for STM32CubeH7 package and a new version will be available fixing multiple issues reported in the Community.
-Amel
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.