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.

AM335x PRU Reading an Array

Hello,

I am currently going through this tutorial:   because I do not want to go through the assembly route and this seems much simpler with the CCS. Simply put, how can I read insanely huge array sizes in the pru without going over the memory limit? I tried creating the array in the userspace and making it global to read from the pru but I came across errors. I understand the memory is limited in the pru and I tried working with Extern variables to see if I can use a global array created from my loader program however because the PRU code itself uses a different compiler and I use CCS to get the binary file I cannot put my loader program since CCS does not have the PRUSSDRV library. I am using the PRU to toggle the LED's. I potentially want to create a program where I control the LED's using a binary file. I just dont know how to read the HUGE binary file in the PRU when toggling the led.

  • Hi,

    I will ask the PRU experts to comment. Feedback will be posted directly here when available.
  • Thank you. Just some information if it may help. What I tried doing was in the loader program I set up to write in the memory:

    unsigned int pru0 = 0xAA;

    prussdrv_pru_write_memory(PRUSS0_PRU0_DATARAM, 0, &pru0, 2);

    or maybe this? (dont know which method to use)

    prussdrv_map_prumem(PRUSS0_PRU0_DATARAM, &pru0DataMemory);

    pru0DataMemory_int = (unsigned int *) pru0DataMemory;

    Then in the pru c code I want to access the stored memory, save it in a variable and read each bit.

    Of course, the data will be read in, at a much larger size than just 0xAA. I wanted to use 0xAA as an example.

    Unfortunately I get seg faults, and I do not know how or where I would access the memory stored in the PRU code.