SPI support for bare metal (version 2.0.99?)

Hello,

I would like to use spi to connect to a ADC on a nrf54l15dk at high speed using DMA.

I want to use nrfconnect bare metal, but cannot find a starting example.

In  https://github.com/nrfconnect/sdk-nrf-bm there are a few spi-examples.

How can I use them? It seems that this is part of a version v2.0.99.

So, how can I use these examples starting from bm version v2.0.1? That is the only option I have in vscode.

    Thanks in advance, Sietse

Parents Reply Children
  • Thanks again.

    I found a few examples on how to combine an nrfx driver in zephyr. I need to properly understand how everything works, so I will try to solve this myself. Often the best way to learn.

    But I have another question. I want to stream the ADC data at 300kHz, so roughly each 3 microsecond a sample. I see how I can receive a block of data (say 2000 bytes) in one transaction, using EasyDMA. But how to connect transactions into a proper stream?

    I understand that after a transaction an interrupt can be generated to start a next block. But is that quick enough? How to make sure the time between each sample always is the same. Some variations are allowed but not too much. Almost half of the 3 usec is used for the actual data acquisition and the spi tranfer, so not much more than 1 usec is available for the interrupt to occur and finish.

    Is it a good idea to use the coprocessor for this? Each interrupt some status is set and the next block is started. In the main loop the received data is copied away to be processed by the main processor using double buffering. Can this be made to work in the bare metal environment?Thanks again.

Related