Skip to content

Commit cb3531c

Browse files
authored
Merge pull request ARMmbed#4305 from LMESTM/fix_increase_stm32_spi_timeout
Increase stm32 timeout for spi transfers
2 parents 5af3b0d + 7d17532 commit cb3531c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

targets/TARGET_STM/stm_spi_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ int spi_master_write(spi_t *obj, int value)
357357
size = (handle->Init.DataSize == SPI_DATASIZE_16BIT) ? 2 : 1;
358358

359359
/* Use 10ms timeout */
360-
ret = HAL_SPI_TransmitReceive(handle,(uint8_t*)&value,(uint8_t*)&Rx,size,10);
360+
ret = HAL_SPI_TransmitReceive(handle,(uint8_t*)&value,(uint8_t*)&Rx,size,HAL_MAX_DELAY);
361361

362362
if(ret == HAL_OK) {
363363
return Rx;

0 commit comments

Comments
 (0)