Other Parts Discussed in Thread: SYSBIOS
Hello,
I am working with the ICE-Board using SYSBIOS and the Industrial SDK. My aim is to configure the PRUSS's INTC. I am able to load the PRU-Code to the IRAM using the pruss_drv.h but i do not get any interrupts to the ARM-processor.
This is the simplified ARM-Code: I am not sure about the eventnumbers because there are some things int pruss_drv.c i don't understand, for AM335x devices there is a subtraction of (i think) 20(0x14) from the given parameter so that i took 20 as event number instead of 2.
tpruss_intc_initdata intcInitData[] = {
{32,0xFF},
{{32,2,1,0},{0xFF,0xFF}},
{{2,2}, {0xFF,0xFF}},
{0xFF}
};
void taskFxn(UArg a0, UArg a1){
int succ;
led_init();
ICSS_Init();
// Initialize PRUSS interrupt controller
PRUSSDRVPruIntcInit(intcInitData);
PRUSSDRVRegisterIrqHandler(22, 1, irqHandler);
PRUSSDRVPruDisable(0);
PRUSSDRVPruDisable(1);
PRUSSDRVPruWriteMemory(PRUSS0_PRU0_IRAM, 0, (unsigned int*)PRUCode0, sizeof(PRUCode0));
PRUSSDRVPruEnable(0);
PRUSSDRVPruWaitEvent(22);
UARTPutString(5, "[Task] interrupt occurred!\n");
}
The PRU just writes the event to its own R31 and then HALT's.
I also have tried to do the initialization from the PRU but without success. Even the code from the PRU Software Development Package (PRU_PRUtoPRU_Interrupt) didn't worked for me. The first PRU did it's Initialization and generated an Event and polled then for the other PRU to generate an Interrupt but the second PRU did not received the Interrupt at all.
I also inserted an infinite loop in the PRU's Code after the Initialization and stopped it in the debugger: None of the INTC registers was set, they had all the value 0x00. I don't know whether this is because of the debugger or a mistake in my code.
I am grateful for any Help.