STM, SPI DMA 16bit #45348
Unanswered
paveldedourek-eaton
asked this question in
Q&A
STM, SPI DMA 16bit
#45348
Replies: 1 comment
-
@FRASTM ^^ |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have some doubts regarding implementation of function spi_dma_move_buffers() used in transceive_dma() - spi_ll_stm32.c
This spi_dma_move_buffers() function has 2nd parameter which is length of data (size_t data type).
spi_stm32_dma_rx_load()_ function is called in spi_dma_move_buffers() and second parameter is length of data also (size_t data type).
I do not understand, why there is following equation:
zephyr/drivers/spi/spi_ll_stm32.c
Line 210 in 4c34331
In documentation, you can find, that second parameter is used for block_size = is the number of bytes to be transferred for this block.
When I configured my DMA to cooperate with SPI where frames are 16bit and I wanted to send/receive 6 bytes (3 words) I got accoring to equation 3 bytes to be received (6/2=3). But at the end we are going to transfer 6 bytes.
I have a feeling that something is not implemented correctly, can somebody help me with it who is more experienced with this driver? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions