Question
How to reduce the time between SPI (DMA) transactions
I need to transfer a large amount of bits over SPI de-asserting/asserting the select line very 64 bits. I'm using DMA. The time between transmissions is huge, as can be seen below:
The pink channel is SCK, each chunk is 64 bits. The code is below:
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_4, 0);
HAL_StatusTypeDef rc = HAL_SPI_Transmit_DMA(&hspi1, buff, 8);
while (LL_SPI_IsActiveFlag_EOT(SPI1)) {}
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_4, 1);
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_4, 0);
HAL_SPI_Transmit_DMA(&hspi1, buff, 8);
while (LL_SPI_IsActiveFlag_EOT(SPI1)) {}
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_4, 1);
HAL_Delay (1000); /* Insert delay 100 ms */
}How can I decrease this delay?
I have though that I could config. DMA to send all the data I have, but I need to generate a pulse in the SPI SS line every 64 bits. How can I do this?
