Quantcast
Channel: Processors forum - Recent Threads
Viewing all articles
Browse latest Browse all 17527

Unable to assert PRU EVTOUT1 on OMAPl138

$
0
0

I'm trying to assert the EVTOUT1 interrupt from PRU0 on to the OMAPL138 ARM core, to signal a completion event. I am so far unsuccessful in doing so. I would like this to be done on channel 3 of the interrupt controller for both the PRU and ARM.

I've attempted to follow the TI Interrupt Controller Wiki page to set up interrupts. Here is my PRU application code to generate the interrupt.

#include <stdint.h>
#include "pru_ctrl.h"
#include "pru_intc.h"

volatile register unsigned int __R30;
volatile register unsigned int __R31;

#define EVTOUT1			(3) //Event 3
#define PRU_CHANNEL		(3)
#define ARM_CHANNEL		(PRU_CHANNEL)
#define PRU_VEC_VALID   (1 << 5)

/// Map EVTOUT1
inline void initializeInterrupts(void)
{
	pruIntc CT_INTC;

	// Map event 3 to channel 3
	CT_INTC.CMR0_bit.CH_MAP_3 = PRU_CHANNEL;

	// Map channel 3 to host 3
	CT_INTC.HMR0_bit.HINT_MAP_3 = ARM_CHANNEL;

	// Ensure event 3 is cleared
	CT_INTC.SICR = EVTOUT1;

	// Enable event 3
	CT_INTC.EISR = EVTOUT1;

	// Enable Host interrupt 3
	CT_INTC.HIEISR |= EVTOUT1;

	// Enable Global Interrupts
	CT_INTC.GER = 1;
}

inline void announceCompletion(void)
{
	pruIntc CT_INTC;

	//Assert EVTOUT1
	__R31 = PRU_VEC_VALID | EVTOUT1;

	// Ensure event 3 is cleared
	CT_INTC.SICR = EVTOUT1;
}

void main(void)
{
	initializeInterrupts();
	announceCompletion();
}

Is there anything obviously wrong? One thing that I can think of is that the EVTOUT1 is mapped to the wrong event. The includes are the files that come from the PRU v4.0 SDK.

Thanks

Austin


Viewing all articles
Browse latest Browse all 17527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>