cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7 nucleo SPI various size (len) problem

embvis
Associate III
Posted on December 06, 2017 at 23:53

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'');

};0690X0000060954QAA.png

#stm32h7 #hal_spi_transmit #spi
0 REPLIES 0