You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi everyone.
I have an STM32F4 which communicates to an AD converter via SPI. The AD provides 2 samples, each 16 bit, for every cycle. I can configure the data rate of the AD by using a PWM timer. By detecting the BUSY pin of the AD, I could trigger an interrupt for incoming samples.
For improving the efficiency of the overall system I might want to use the DMA during sampling. I have some buffers with a certain size which should be filled by the DMA. However, I didn't manage to make it working. I added the KConfig option CONFIG_SPI_STM32_DMA=y, and enabled the DMA on devicetree. But I find difficulties understanding how to use the SPI API with the DMA enabled. In theory, I should give to the DMA the memory address of the buffer, its length, and the memory increment offset. How can this be done on Zephyr?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone.
I have an STM32F4 which communicates to an AD converter via SPI. The AD provides 2 samples, each 16 bit, for every cycle. I can configure the data rate of the AD by using a PWM timer. By detecting the BUSY pin of the AD, I could trigger an interrupt for incoming samples.
For improving the efficiency of the overall system I might want to use the DMA during sampling. I have some buffers with a certain size which should be filled by the DMA. However, I didn't manage to make it working. I added the KConfig option CONFIG_SPI_STM32_DMA=y, and enabled the DMA on devicetree. But I find difficulties understanding how to use the SPI API with the DMA enabled. In theory, I should give to the DMA the memory address of the buffer, its length, and the memory increment offset. How can this be done on Zephyr?
I appreciate any help and suggestion.
Beta Was this translation helpful? Give feedback.
All reactions