Hello,
Is there an PRU EDMA example updated to work with the PRU-ICSS on the AM335x?
The example at https://gforge.ti.com/gf/project/pru_sw/scmsvn/?action=browse&path=%2Ftrunk%2Fexample_apps%2F will only work with the older PRU.
Thanks,
Chris
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.
Hello,
Is there an PRU EDMA example updated to work with the PRU-ICSS on the AM335x?
The example at https://gforge.ti.com/gf/project/pru_sw/scmsvn/?action=browse&path=%2Ftrunk%2Fexample_apps%2F will only work with the older PRU.
Thanks,
Chris
Hi Chris,
Information on the PRU for the AM335x can be found here: https://github.com/beagleboard/am335x_pru_package. There is documentation and an assembler along with several examples. However please note that everything there is community supported.
Regards,
Dave
Dave,
Thanks - I have those examples, but they are missing most of the examples that were available for the previous version of the PRU. Specifically I am searching for and EDMA example and an example where the PRU writes directly to DRAM.
Thanks,
CHris
Dave,
This is my first post to the community so if it's not quite in the right place to ask this thread, so be it this time :).
I've been through the documentation on the PRU and the examples I found online for the PWM and Sin generator, but the common thread is the prussdrv that sets up the PRU under a Liniux environment, loading up the INTC, the BIN file and executing the basic skeleton.
What I'm trying to do is to implement a simple PRU program from the examples (leds blink, gpio_pwm_pru example (blinker) ), WITHOUT LINUX.
I'm using the Starterware Demo package as a beginning and have integrated in the uCOS OS III.
Because I don't have the file system implemented up yet, or LINUX, I use the pasm with -c option to generate an array of the PRU code which works fine.
I went into the prussdriver and pulled some, not all of the routines, modifying the execute_program function to use the "c" h array vs. the bin.
What I found was that my code would 'go off into the weeds' on a seemingly very simple instruction, trying to set the PRU0 to disable, prior to transfer of code from my program into the PRU0 instruction memory.
Based on the readings I "think" ive got the right addresses using the "global" memory map for the location of the PRU0 control register.
//***********************************************************************
// Defines representing PRU Memory Global Addresses
//***********************************************************************/
#define PRU0_CONTROL_BASE 0x4A322000
#define PRU1_CONTROL_BASE 0x4A324000
#define PRU0_IRAM_BASE 0x4A334000
#define PRU1_IRAM_BASE 0x4A338000
#define PRU0_DATARAM_BASE 0x4A300000
#define PRU1_DATARAM_BASE 0x4A302000
#define PRU_SHARE_RAM_BASE 0x4A310000
//***********************************************************************
// pru_disable(prunum)
//
// input: unsigned int, 0 = PRU 0, 1 = PRU 1, all else undefined
// return: 0 = status OK
// -1= bad parameter
//
// PRU selected is disabled
//***********************************************************************/
int pru_disable(unsigned int prunum)
{
unsigned int *prucontrolregs;
UARTprintf("PRU disabled\n");
if (prunum == 0)
prucontrolregs = (unsigned int *) PRU0_CONTROL_BASE;
else if (prunum == 1)
prucontrolregs = (unsigned int *) PRU1_CONTROL_BASE;
else
return -1;
*prucontrolregs = 1; // enable bit set false (bit 1), soft reset N bit set (bit 0) reset off and disable PRU
return 0;
Anyway, setting software breakpoints, as soon as *prucontrolregs = 1; is executed, the return is never reached.
I'll continue to dig through the mapping and set up of the INTC which I have NOT done yet where the problem may be.
I was wondering if there were any examples you or someone else in the community may know of online that exercise the PRU on the Beaglebone platform using the Starterware base vs. Linux?
Thanks much in advance for any pointers.
Ken.
Ken,
usually it is better to open a new thread for a new question. Otherwise it might not get tracked accordingly.
Now for source code examples of PRU drivers you might also look at IA-SDK which contains versions for Sys/Bios 6, the TI RTOS.
Regards.
Hi,
You need to check whether PRU-ICSS domain is powered on before making any access - this is not enabled by default
You may refer to ICSS_Init in sdk\platform\am335x\src\am335x_indcomm_startup.c in http://www.ti.com/tool/sysbiossdk-ind-sitara