This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

BeagleBone Black using PRU to write to SD Card

I currently have a BeagleBone Black that I am capturing data from a sensor through the AM335x's PRU.  Now I need to save this captured data to some sort of external removable memory, ideally the integrated micro sd slot.  It seems feasible according to Page 1366 of the Sitara Technical Reference Manual.  Ultimately I just want to dump the data as a binary file.  If I create a clock from PRU1 and enable the chip select and write to Data 0 will this work?  Is there some example code that I could work with to do some of these functions?

  • You will be able to write data to a sector in the card this way, but to write data in a file you will need to implement a file system. I think that it will be better if you transfer data to a memory buffer and use the Linux OS to write to the card.
  • My concern with returning the data back to the Linux OS is doing it in a streamline way as to make sure that no samples are lost.  While the PRU is dumping data into DDR (Either shared or its own allocated RAM)  the Linux OS will take that portion of memory and store it out to the SD Card. However, with the PRU having constant access to memory won't there be a hardware/software conflict and wouldn't there be data lost.  The PRU would need to stop instruction while the OS dumped the data to the SD card.  I think I need to do some more research needs to be done on the connection between the PRU and the Linux OS  and how they will interact when accessing the same environment.

    Thank you

    Tyler