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.

CCS/AM4379: PRU_IEP example issue

Part Number: AM4379

Tool/software: Code Composer Studio

Hello, 

I am trying PRU_IEP.c in pru-software-support-package retrieved from the following place.

git.ti.com/.../

Build was successfully done.

When I start running this program on PRU, it continues polling at the while statement even when it passes for more than ten seconds. At this state, PRU_ICSS_IEP_TMR_CMP_STS shows 1.

Is there any other condition to let R31.31 = 1?

Yuji Hosogaya

  • Hi,

    The PRU experts have been notified. They will respond here.
  • Hello,

    I am still waiting for the response for this issue.

    Would anyone reply to it, or should I give it up?

    Regards,

    Yuji Hosogaya

  • Sorry about this delay. I have escalated the request.
  • This IEP example uses the RemoteProc Linux driver to configure the the interrupt through the provided resource table (rsc_table_pru.h in this example). During the firmware loading process, the Linux driver will configure system event 7 to map to channel 1 and host interrupt 1.

    If you load this example through CCS, then the interrupt will not be configured since the Linux driver is not involved.

    Please see the PRU_PRUtoARM_Interrupt project for an example on how to configure the PRU interrupts without involving the Linux driver (using C code in the PRU). You'll need to change the system event number, host number, and channel number, but the example should give the steps to enable the interrupt.

    Jason Reeder

  • Hello Mr. Reeder,
    thank you very much for your reply.

    In order to map event 7 to channel 1 and host interrupt 1, I simply inserted following code after the line enabling OCP master port.

    // Map event 7 to channel 1
    CT_INTC.CMR1_bit.CH_MAP_7=1;

    // Map channel 1 to HOST_NUM
    CT_INTC.HMR0_bit.HINT_MAP_1 = 1; /* Select correct bit field and enter proper value */;

    // Clear event
    CT_INTC.SICR = 7; /* Clear proper event */;

    // Enable event
    CT_INTC.EISR = 7; /* Enable proper event */;

    // Enable Host interrupt
    CT_INTC.HIEISR_bit.HINT_EN_SET_IDX=1;

    // Globally enable host interrupts
    CT_INTC.GER = 1; /* Enable global events */;

    It still gave the same result.
    Am I misunderstanding your suggestion?

    Regards,
    Yuji Hosogaya