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.

Setting up for HPI on OMAP-L138

Other Parts Discussed in Thread: OMAP-L138

All:

From SPRUH77A, 22.2.8 Initialization

1. Perform the necessary steps for pinmuxing

    It looks like there are 4 pinmux registers that must be set up: PINMUX 13, PINMUX 14, PINMUX 15, and PINMUX 16  to cover all of the pins associated with HPI.

Does anyone have example code to do this?

2. Configure 2 pins in  CFGCHIP1

    If I am using 16-bit wide HPI address, it looks like HPIBYTEAD should be set to 0, correct?

    HPIENA needs to be set to 1.

3. HPIC - when I bring up the DSP side of OMAP under Code Composer Studio (6.1.1), I can view HPIC under HPI0DSP, but I cannot change any bits. Is there something blocking me from setting HWOB for instance from the CCS Debug view?

I am sure to have more questions, but I have not seen these answered in previous discussions on HPI.

  • Hi,

    We are working on this and will get back to you shortly.

    Thanks & regards,
    Sivaraj K
  • All:

    Here is what I have so far. It was a lot easier to initially use some "magic numbers" for initializing.

    It looks like all of pinmux13, pinmux14, and pinmux15 needs to be set up for HPI.

    Only 2 nibbles of pinmux16 are involved with HPI.

    /*****************************************************************************
    * FUNCTION: cnfg_hpi
    *
    * PURPOSE : Configures OMAP registers for the HPI controller and pinmuxing
    * for FPGA communication.
    *
    *****************************************************************************/
    static void cnfg_hpi(void)
    {
    //pinmux register 13 - HPI bits
    unsigned int* PINMUX13 = (unsigned int*)(MEM_SYS_BASE + 0x154);
    *PINMUX13 = 0x22222222;

    //pinmux register 14 - HPI bits
    unsigned int* PINMUX14 = (unsigned int*)(MEM_SYS_BASE + 0x158);
    *PINMUX14 = 0x22222222;

    //pinmux register 15 - HPI bits
    unsigned int* PINMUX15 = (unsigned int*)(MEM_SYS_BASE + 0x15C);
    *PINMUX15 = 0x22222222;

    //pinmux register 16 - HPI bits
    unsigned int* PINMUX16 = (unsigned int*)(MEM_SYS_BASE + 0x160);
    *PINMUX16 |= 0x00000022;

    HWREG(SOC_SYSCFG_0_REGS + SYSCFG0_CFGCHIP1) |= SYSCFG_CFGCHIP1_HPIENA;

    }

  • just added power control - hopefully this is correct.

       PSCModuleControl(SOC_PSC_1_REGS, HW_PSC_UHPI, PSC_POWERDOMAIN_ALWAYS_ON,

        PSC_MDCTL_NEXT_ENABLE);

    I am still not able to change bits in HPIC, even though information now shows up in the registers under HPI0DSP.

  • Dear Todd,

       If I am using 16-bit wide HPI address, it looks like HPIBYTEAD should be set to 0, correct?

    Yes, it should be zero for 16bit.

    3. HPIC - when I bring up the DSP side of OMAP under Code Composer Studio (6.1.1), I can view HPIC under HPI0DSP, but I cannot change any bits. Is there something blocking me from setting HWOB for instance from the CCS Debug view?

    You can't write HWOB bit as it needs to control by external host.

    Which device you have connected in HPI ?

    Here, you can see, only HOST can control the HWOB bit.

  • The connections are to an adjoining FPGA. So, given that the pinmuxing is done, power has been set up, and HPI is enabled, the FPGA should be able to change HWOB, right?
  • I also take HPI out of reset... here is my latest configuration code:

    /*****************************************************************************
    * FUNCTION: cnfg_hpi
    *
    * PURPOSE : Configures OMAP registers for the HPI controller and pinmuxing
    *           for FPGA communication.
    *
    *****************************************************************************/
    static void cnfg_hpi(void)
    {
    unsigned long int test;
    //pinmux register 13 - HPI bits
    unsigned int* PINMUX13 = (unsigned int*)(MEM_SYS_BASE + 0x154);
    *PINMUX13 = 0x22222222;
    //pinmux register 14 - HPI bits
    unsigned int* PINMUX14 = (unsigned int*)(MEM_SYS_BASE + 0x158);
    *PINMUX14 = 0x22222222;
    //pinmux register 15 - HPI bits
    unsigned int* PINMUX15 = (unsigned int*)(MEM_SYS_BASE + 0x15C);
    *PINMUX15 = 0x22222222;
    //pinmux register 16 - HPI bits
    unsigned int* PINMUX16 = (unsigned int*)(MEM_SYS_BASE + 0x160);
    *PINMUX16 |= 0x00000022;
    // Turn on clocks to HPI.
        PSCModuleControl(SOC_PSC_1_REGS, HW_PSC_UHPI, PSC_POWERDOMAIN_ALWAYS_ON,
        PSC_MDCTL_NEXT_ENABLE);
        // Enable HPI.
    HWREG(SOC_SYSCFG_0_REGS + SYSCFG0_CFGCHIP1) |= SYSCFG_CFGCHIP1_HPIENA;
    // Take HPI out of reset.
    HWREG(HPI_base + 0x0030) &= 0x0FFFFFF7F;
    test = HWREG(HPI_base + 0x0030);
    }
  • With the above settings, we are able to set up the HPiC and HPIA registers and view them from Code Composer Studio.

    However, the HPID register is not viewable. When we try to update location 0x8000 0000 we are able to see the Address in the HPIA register, but the RAM at that location does not get updated. Unfortunately, the lines between the FPGA and the OMAP cannot be reached with a probe, so a logic analyzer cannot be set up to view the activity of a BGA - to - BGA set of signals.

    Am I missing something - is there some additional permission needed on the OMAP side to allow the "value"  in the HPID to be placed into memory?

    The location was being used by the ARM processor on bring-up, and when the C6000 code was loaded, it was placed into external DDR memory, so writing and reading from 0x8000 0000 seemed ideal from an HPI testing viewpoint.

    Again, am I missing some permission to write to 0x8000 0000?

    Thanks - 

  • I have two different platforms where I can read and write HPIC, and view HPIA, but I cannot update the code at shared memory location 0x80000000 (or 0x80008000 for that matter). Again, is there a setting that I am missing regarding tranfer of contents to and from the HPID register. Unfortunately, the external lines are hidden from view (OMAP BGA package to FPGA BGA package), so I cannot connect these lines to a logic analyzer. I have posted my initialization routine earlier. 

  • Dear Todd,
    Sorry for the delayed responses on this.
    Actually I don't have hands on experience with this peripheral so, I seek some support from internal team.
  • I was told this morning that the waveforms for updating the HPIC and HPIA registers were followed, and the result is confirmed data in both of those registers as viewed by Code Composer Studio (v.6.1.1). However, the HPID register cannot be viewed via CCS (I have no idea why!), and the waveforms generated by the FPGA match the "prescribed waveforms" in the HPI section of the technical reference manual.

    Any idea why we are not seeing RAM being updated?

    Has anyone used the HPI on the OMAP-L138 and can give some guidance?

    Thanks.

  • "Sorry for the delayed responses on this.
    Actually I don't have hands on experience with this peripheral so, I seek some support from internal team."

    Anything to report?
    Is there some other internal setting that is preventing HPID contents from getting to RAM location 0x8000 0000?
    I am really not sure what more I can do at this point.
  • All:

    Again, here is my configuration function for HPI. However, we are unable to read or write the contents of 0x8000 0000, which should be available when running from DDR memory on the DSP side. Is there  a setting that I am missing to allow access to the 0x8000 0000 area of RAM?

    /*****************************************************************************
    * FUNCTION: cnfg_hpi
    *
    * PURPOSE : Configures OMAP registers for the HPI controller and pinmuxing
    *           for FPGA communication.
    *
    *****************************************************************************/
    static void cnfg_hpi(void)
    {
    volatile unsigned long int test;
    //pinmux register 13 - HPI bits
    unsigned int* PINMUX13 = (unsigned int*)(MEM_SYS_BASE + 0x154);
    *PINMUX13 = 0x22222222;
    //pinmux register 14 - HPI bits
    unsigned int* PINMUX14 = (unsigned int*)(MEM_SYS_BASE + 0x158);
    *PINMUX14 = 0x22222222;
    //pinmux register 15 - HPI bits
    unsigned int* PINMUX15 = (unsigned int*)(MEM_SYS_BASE + 0x15C);
    *PINMUX15 = 0x22222222;
    //pinmux register 16 - HPI bits
    unsigned int* PINMUX16 = (unsigned int*)(MEM_SYS_BASE + 0x160);
    *PINMUX16 |= 0x00000022;
    // Turn on clocks to HPI.
        PSCModuleControl(SOC_PSC_1_REGS, HW_PSC_UHPI, PSC_POWERDOMAIN_ALWAYS_ON,
        PSC_MDCTL_NEXT_ENABLE);
        // Enable HPI.
    HWREG(SOC_SYSCFG_0_REGS + SYSCFG0_CFGCHIP1) |= SYSCFG_CFGCHIP1_HPIENA;
    // Take HPI out of reset.
    HWREG(HPI_base + 0x0030) &= 0x0FFFFFF7F;
    // test code to view HPI register.
    test = HWREG(HPI_base + 0x0030);
    }
  • Dear Todd,
    Sorry for the delayed response on this issue.

    Can you please refer to the below post ?
    e2e.ti.com/.../123391

    We have so many customers who have been working with HPI without any problem.
    It seems some configuration or permission issue here.

    C6455 HPI example found here (FYR):
    http://www.ti.com/tool/sprc234
  • Hi Todd

    Do you have any update for this issue? we also met this similar issue in C67xx platform and have no idea.

    we can write correct register value of HPIC and HPIA but we are unable to write the contents of 0x8001 4030 as we hoped.

    thanks for your reply.
  • Yimin:
    Sorry, issue was never resolved. It was viewed as an alternative method of getting code into the processor, so there was no great loss when it did not work.
  • Hi Sir

    After setting HPIBYTEAD  as 1 , this issue is fixed

    for your information.

    BR

    Yimin