2017-04-27 12:20 AM
Hello all,
I'm trying to setup the STM32L476RG via SPI with an external DAC (SPI clock speed: 40MHz). I used the HAL_SPI_Transmit() function to transmit a 24Bit word.After one transmission there is a gap of 2.5�s befour the new transmission starts. For my application I need a fast transmission. Is there a posibility to purge the gap?
Thank you in advance,
Fabian
#stm32l4 #spi #spi-bus #gap2017-05-22 05:18 AM
SPI is usually synchronous and duplex, i.e. there is data reception with every transmission.
Not sure if the Cube code ignores RX-related events. Neither do I use Cube.
2017-05-22 06:18 AM
Yes, because the end of a byte transmission is driven by RXNE. The DMA TX interrupt will occur before the last byte is push out of the MOSI pin... so raising NSS will chop the last byte.
2017-05-23 10:09 AM
In order being well suited with DMA&SPI usage, I'm working on the exemple provided in HAL_Driver folder nommed SPI_FullDuplex_ComDMA. But when I use the DMA in Normal mode ( as described in the file) i got nothing on spi pins output, in contrast when I configured it in circular mode I saw the transmission via the oscilloscope.
I don't understand why normal mode doesn't work.