In this case, you can reference: https://github.com/apache/nuttx/blob/master/drivers/rpmsg/rpmsg_port_spi.c https://github.com/apache/nuttx/blob/master/drivers/rpmsg/rpmsg_port_spi_slave.c which contains the common logic to send/recv messages on spi bus async.
On Tue, Oct 15, 2024 at 10:46 PM Felipe Moura Oliveira <moura....@gmail.com> wrote: > Hello Xiang Xiao, > > thanks for sharing with me about rpmsg, to be honest it is new for me =/, I > was locked in baremetal for several years. For now I cannot use it because > my host mcu is running baremetal (maybe in the future we will change it). I > developed a simple protocol using ack and nak whey to handle communication > with master and slave. About "lock" my app until data is available, I am > thinking use semaphore to wait to do it, so my solution will be able to > sleep my mcu until spi releases it. > > Em ter., 15 de out. de 2024 às 11:24, Xiang Xiao < > xiaoxiang781...@gmail.com> > escreveu: > > > Yes, we use DMA for both SPI master/slave, but DMA is more related to the > > driver not the framework. > > > > On Tue, Oct 15, 2024 at 2:08 PM Tomek CEDRO <to...@cedro.info> wrote: > > > > > One question by the way someone asked me recently - can NuttX SPI Slave > > > work in DMA mode? :-) > > > > > > -- > > > CeDeROM, SQ7MHZ, http://www.tomek.cedro.info > > > > > > > > -- > *Felipe Moura de Oliveira* > *Universidade Federal de Minas Gerais* > Linkedin <https://www.linkedin.com/in/felipe-oliveira-75a651a0> > <https://twitter.com/FelipeMOliveir?lang=pt-br> >