Question
Very slow HAL (SPI)
Posted on May 02, 2017 at 09:16
Hi,
I use the HAL Library for a STM32L4 MCU clocked at 80MHz. The time between two Bytes are 3us. This is to slow for my Application, but I can not transfer more bytes or use a DMA, because I must react on a Signal from a pin.
for (int i = 2; i < 8; i++)
{ HAL_SPI_TransmitReceive(&hspi1, (uint8_t *)&awTxBuffer[i], (uint8_t *)&awRxBuffer[i], 1, 0x00); while (HAL_SPI_GetState(&hspi1) != HAL_SPI_STATE_READY);// while (GPIO_PIN_RESET == HAL_GPIO_ReadPin(GPIOA, GPIO_PIN_5));}Is there a way to speed up my Application?
Thanks for hints,
Philipp