is there a way to implement SPI burst mode in stm32f401?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-07-31 3:24 PM
Hi All,
I am trying to use STM32F401 NUCLEO Board to talk to ST IMU LSD6DSL.
LSM6DSL supports burst mode read, but I can not find a way to implement SPI burst mode from the stmf401 s library.
I am wonderinf if there is any way to implement a SPI burst mode in stm32f401.
Thank you !!
- Labels:
-
SPI
-
STM32F4 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-07-31 3:59 PM
"Burst mode" as in reading multiple bytes in the same transaction? Should be no problem.
If the SPI clock is fast, you may need to use DMA if you don't want to see any delay between SCK pulses, or implement your own code which responds to TXE quickly enough. But the SPI protocol doesn't really require this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-07-31 7:27 PM
I'm not aware of your IMU specs but Usually​ burst mode in senors means that you can read successive memory addresses without issuing new read command. Typically sensor data values are in successive memory addresses. for example gyro x, y , z. So you can read 3 axis data just with a single read command.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-08-03 1:31 PM
Hi
Prain's explaination of "Burst mode" is exactly what we want. We are using DMA, but the problem is that we can't figure out how to receive multiple bytes/words after transmitting a single read address. We are also aware of the size argument to HAL_spi_TransmitReceive_DMA, but this seems to send the read address multiple times rather than sending it once and waiting to receive multiple bytes.
Is there any suggestion on doing this ? Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-08-04 6:44 AM
In SPI multi-byte, the number of transmit and receive bytes should be equal. So you can use HAL_SPI_TransmitReceive_DMA() function.
