Skip to main content
Visitor II
September 30, 2021
Solved

Event-based buffer transfer from M4 to permanent file in A7 Linux fs

  • September 30, 2021
  • 1 reply
  • 735 views

Hi,

I have a firmware doing permanent acquisition and processing of a signal coming from SPI on the M4 side - consider it an audio stream.

On-demand I would like to save the processed buffer (say ~10 consecutive buffers once in a while, e.g. 1s every 10s) from the SRAM to a permanent file accessible from the A7 Linux userspace.

What would be the best way to do this with the least impact on the M4 load ?

My first guess was DMA from SRAM to DDR and then have Linux write from DDR to eMMC/SD but isn't there a more direct way ?

Thanks a lot

Yann

    This topic has been closed for replies.
    Best answer by Kevin HUBER

    Hello @YChen.12​ ,

    I understand that you want to store data in A7 side that are coming from M4 side.

    Please look at this demonstration application: https://wiki.st.com/stm32mpu/wiki/How_to_exchange_data_buffers_with_the_coprocessor

    This page explains how it is possible to send large data between the processors and it details two methods.

    Since you are sending audio, I think the best method for your case is the one with large buffer in DDR. The one with rpmsg_sdb driver (RPMsg shared data buffer):0693W00000FBCx7QAH.jpgThis method must be used when the Data flow sampling frequency is more than 5 MHz.

    By following the page, you are able to realize some tests with the logicanalyser application

    Regards,

    Kevin

    In order to give better visibility on the answered topics, please click on 'Select as Best' on the reply which solved your issue or answered your question. See also 'Best Answers'

    1 reply

    Technical Moderator
    October 1, 2021

    Hello @YChen.12​ ,

    I understand that you want to store data in A7 side that are coming from M4 side.

    Please look at this demonstration application: https://wiki.st.com/stm32mpu/wiki/How_to_exchange_data_buffers_with_the_coprocessor

    This page explains how it is possible to send large data between the processors and it details two methods.

    Since you are sending audio, I think the best method for your case is the one with large buffer in DDR. The one with rpmsg_sdb driver (RPMsg shared data buffer):0693W00000FBCx7QAH.jpgThis method must be used when the Data flow sampling frequency is more than 5 MHz.

    By following the page, you are able to realize some tests with the logicanalyser application

    Regards,

    Kevin

    In order to give better visibility on the answered topics, please click on 'Select as Best' on the reply which solved your issue or answered your question. See also 'Best Answers'