STM32 SPI do not use a timeout for spi transfers

Default timeout of 10ms was reported as an issue in #4300

There seems to be conditions or use cases where the system is loaded with
higher priority tasks so that SPI transfer would be delayed more than 10ms.
Recommendation from MBED team is to not implement any timeout at all as
there is no defined API in MBED to inform application of error cases.
pull/4305/head
Laurent MEUNIER 2017-05-11 18:24:33 +02:00
parent 42f9a59c0d
commit 7d17532911
1 changed files with 1 additions and 1 deletions

View File

@ -357,7 +357,7 @@ int spi_master_write(spi_t *obj, int value)
size = (handle->Init.DataSize == SPI_DATASIZE_16BIT) ? 2 : 1; size = (handle->Init.DataSize == SPI_DATASIZE_16BIT) ? 2 : 1;
/* Use 10ms timeout */ /* Use 10ms timeout */
ret = HAL_SPI_TransmitReceive(handle,(uint8_t*)&value,(uint8_t*)&Rx,size,10); ret = HAL_SPI_TransmitReceive(handle,(uint8_t*)&value,(uint8_t*)&Rx,size,HAL_MAX_DELAY);
if(ret == HAL_OK) { if(ret == HAL_OK) {
return Rx; return Rx;