Non-blocking access to SD Card in nrf connect sdk? (SPIM/DMA/DiskAccess)

Hello!

im trying to write chunks of bytes to an sd card in a non blocking style. One possibility im pursuing is to use SPIM, where the actual writing is done by DMA-Controller and wont block the CPU. 
I access the sd card from DiskAccess from zephyr, but this "path" only allows normal spi interactions which will block the CPU. 

Question: Is there a possibility to implement SPIM with DiskAccess from zephyr, or is there maybe another way to write data to an sd card without blocking the CPU, or do i have to manually communicate with the SD card via SPI? 

Kind regards
Daniel 

PS: Im using nRF52833 DK with nRF Connect SDK 2.7

Parents
  • Hi,

    I access the sd card from DiskAccess from zephyr, but this "path" only allows normal spi interactions which will block the CPU. 

    Can you elaborate on that, where does it specify this? Looks like it's using file system which I think should be compatible with SPIM. Or were you referring to how the DisckAccess lib is implemented? 

    Also what nRF Connect SDK version are you using?

    regards

    Jared

  • Hello Jared, thank you for responding.

    Yes, i'm referring to the DiskAccess implementation. Through this module, spim is used but waits for the completition of the spi transfer, blocking the cpu doing other tasks. 

    Is there a module of Nordic capable of using spim with sd cards without blocking the writes available or planned?

    As statet above, im using nRF Connect SDK version 2.7.

    Kind regards
    Daniel

Reply
  • Hello Jared, thank you for responding.

    Yes, i'm referring to the DiskAccess implementation. Through this module, spim is used but waits for the completition of the spi transfer, blocking the cpu doing other tasks. 

    Is there a module of Nordic capable of using spim with sd cards without blocking the writes available or planned?

    As statet above, im using nRF Connect SDK version 2.7.

    Kind regards
    Daniel

Children
Related