Skip to content

Commit cb4dd19

Browse files
authored
Merge pull request ARMmbed#14689 from MubeenHCLite/HighSpeed_Async_SPI_limitation
Information on Asynchronous SPI limitation on High Speeds
2 parents 891805b + e989c48 commit cb4dd19

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

targets/TARGET_STM/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,17 @@ Option is also to define your own `HAL_ETH_MspInit` function,
406406
you then have to add **USE_USER_DEFINED_HAL_ETH_MSPINIT** macro.
407407

408408

409+
### Asynchronous SPI limitation
410+
411+
The current Asynchronous SPI implementation will not be able to support high speeds (MHz Range).
412+
The maximum speed supported depends on
413+
- core operating frequency
414+
- depth of SPI FIFOs (if available).
415+
416+
For application that require optimized maximum performance, the recommendation is to implement the DMA-based SPI transfer.
417+
The SPI DMA transfer support shall be implemented on a case-by-case based on below example
418+
https://github.com/ABOSTM/mbed-os/tree/I2C_SPI_DMA_IMPLEMENTATION_FOR_STM32L4
419+
409420

410421
## Mbed OS Uncyclo pages
411422

targets/TARGET_STM/stm_spi_api.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,6 +1034,7 @@ static int spi_master_start_asynch_transfer(spi_t *obj, transfer_type_t transfer
10341034
}
10351035

10361036
// asynchronous API
1037+
// DMA support for SPI is currently not supported, hence asynchronous SPI does not support high speeds(MHZ range)
10371038
void spi_master_transfer(spi_t *obj, const void *tx, size_t tx_length, void *rx, size_t rx_length, uint8_t bit_width, uint32_t handler, uint32_t event, DMAUsage hint)
10381039
{
10391040
struct spi_s *spiobj = SPI_S(obj);

0 commit comments

Comments
 (0)