Use HAL_SPI_Receive_DMA receive data. Sometimes the received data shift 3 bytes. Why?
The board is STM32F750, build as SPI slave.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-06-09 7:45 PM
SPI slave receives data of unknow size.
When SPI master gives a rising edge, SPI slave detects the rising edge and starts HAL_SPI_Receive_DMA(define a large size amount of data to be received). When SPI master gives a falling edge, SPI slave detects the falling edge and uses HAL_SPI_DMAStop to end the spi transfer.
But sometimes, the received data of SPI slave shifts 3 bytes. Does anybody know why?
Labels:
- Labels:
-
DMA
-
SPI
-
STM32F7 Series
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-06-10 7:38 AM
So you're using a CS line that is active high?
Put a delay between the first edge and the first data being sent. The slave needs to be ready for the data prior to the first clock.
If you feel a post has answered your question, please click "Accept as Solution".
