transfer 64kb of data via SPI using DMA on STM32H7
Hi, I want to transfer 64kByte of data from memory to my display controller using SPI and DMA.
Everything is working smoothly so far, but I have some problems of understanding, when I try to use the max. number of bytes.
So: 64kByte = 65536 Bytes.
But the SPI_CR2 Register ist 16bit, so takes only 65535 as Maximum number.
Also the RM states for the DMA:
"The amount of data to be transferred (up to 65535) is programmable and related to the
source..."
The HAL function is also taking a uint16_t for the size
HAL_StatusTypeDef HAL_SPI_Transmit_DMA(SPI_HandleTypeDef *hspi, const uint8_t *pData, uint16_t Size)
and treats a size of 0 as an error.
So it looks like the number of bytes that can be transferred is 1.. 65535, wich is in fact 64kByte -1 Byte.
That means I cannot send my memory buffer with full 64kByte in one transfer.
Any hint on how to set this up to transfer 65536 bytes would be appreciated, or the info confirmation, that this is not possible.
Stefan