mirror of https://github.com/ARMmbed/mbed-os.git
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
parent
42f9a59c0d
commit
7d17532911
|
@ -357,7 +357,7 @@ int spi_master_write(spi_t *obj, int value)
|
|||
size = (handle->Init.DataSize == SPI_DATASIZE_16BIT) ? 2 : 1;
|
||||
|
||||
/* 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) {
|
||||
return Rx;
|
||||
|
|
Loading…
Reference in New Issue