Hi Johan,
it is rather similar to F1, just some different names for DMA stuff.
You can probably start from a F1 example:
https://github.com/libopencm3/libopencm3-examples/blob/master/examples/stm32/f1/lisa-m-2/spi_dma/spi_dma.c
and make the changes for F4 (dma_stream_x instead of dma_channel_x).
See e.g.
https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/mcu_periph/spi_arch.c
for bit more advanced version using DMA on F1 and F4.
Hope that helps,
Felix
On Wed, Jan 28, 2015 at 3:35 PM, Johan <kungjo...@gmail.com> wrote:
> I am using SPI on my STM32F4 Discovery board together with libopencm3.
>
> The function I use is spi_send located in spi_common_all.c
> This function is blocking and sends one byte(short) at a time.
>
> I wonder if there is some driver/API in libopencm3 to use SPI on STM32F4
> in interrupt or DMA mode?
>
> Best regards
> Johan
>
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming. The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is
> your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> libopencm3-devel mailing list
> libopencm3-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/libopencm3-devel
>
>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
libopencm3-devel mailing list
libopencm3-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libopencm3-devel