We just upstreamed a general SPI master/slave solution you can use directly
or as a reference:
https://github.com/apache/nuttx/blob/master/drivers/rpmsg/rpmsg_port.c
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
It is based on rpmsg, so it can work with nuttx-nuttx and linux-nuttx and
all rpmsg services can work very well.
For the detailed info, you can watch the topic come from NuttX workshop:
Day2: 02 - Linux to NuttX communication in Xiaomi (youtube.com)
<https://www.youtube.com/watch?v=-YLAQlJR1vA&list=PLd73yQk5Fd8JJ5vfwN9z16emlqm36bNNF&index=18>
Day2: 07 RPTUN_framework_&_services_between_multi-CPUs (youtube.com)
<https://www.youtube.com/watch?v=6uehz3WQ0vU&list=PLd73yQk5Fd8JFJW0cIHsDcG-kd6OHiHEz&index=17>
Day2: 03 NuttX VirtIO Framework and Future Works (youtube.com)
<https://www.youtube.com/watch?v=CYMkAv-WjQg&list=PLd73yQk5Fd8JlsCoUYGyAf7W63BekgPup&index=8>

Thanks
Xiang

On Tue, Oct 15, 2024 at 8:09 AM Felipe Moura Oliveira <moura....@gmail.com>
wrote:

> The right way to implement an event-driven application - SPI SLAVE Hello
> everyone, in the last few weeks I have been developing a solution in
> esp32c6 that communicates with another mcu from an SPI, the application I
> am developing is an spi slave. Up until now, my application has been
> executing reads inside a while(1) (I know, this mode is very dummy) and
> when I receive n_bytes > 0 I have been handling this. Now I need to improve
> my solution so that my application stays in "sleep" and when an spi
> interruption occurs it can continue with the execution. I am having
> difficulty understanding the right way to do this in Nuttx. Has anyone done
> something similar or have tips on where I should go next?
>
> Regards!
> --
> *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>
>

Reply via email to