AnsweredAssumed Answered

STM32H7 nucleo SPI various size (len) problem

Question asked by Mikolaj Z on Dec 6, 2017

Using  HAL_SPI_Transmit function with variuse size I can hang SPI. 

It should send every time 10 chars, but sending it only one time. All the rest equal to first set size.

 

HAL_SPI_Transmit(&hspi1, (uint8_t *)buff_tx, 10, 1000);
while(hspi1.State != HAL_SPI_STATE_READY){
__ASM("NOP");
};

 

HAL_SPI_Transmit(&hspi1, (uint8_t *)buff_tx, 8, 1000);
while(hspi1.State != HAL_SPI_STATE_READY){
__ASM("NOP");
};

 

HAL_SPI_Transmit(&hspi1, (uint8_t *)buff_tx, 6, 1000);
while(hspi1.State != HAL_SPI_STATE_READY){
__ASM("NOP");
};

HAL_SPI_Transmit(&hspi1, (uint8_t *)buff_tx, 10, 1000);
while(hspi1.State != HAL_SPI_STATE_READY){
__ASM("NOP");
};

Outcomes