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.

SPI with arm omapl137

Other Parts Discussed in Thread: OMAPL138

Hi,

I have been trying to get the spi examples from starter ware to run on the ARM. I'm able to run the dsp examples for both: with edma and without edma. Since I'm using the EVMOMAPL137 I did the necessary changes to run the example with SPI0. SPI0 has a flash that is compatible with the OMAPL138 example. Well, the fact that the DSP can succesfully read and write could be consider as a good indicator.

I changed 2 things, everywhere where I had SPI1 I replaced it with SPI0 and the edma event for SPI RX and TX are 15 and 14 instead of 19 and 18. Oh,.... I also had to change where the code is located in memory from     DSPL2RAM     o = 0x00800000  l = 0x00040000  /* 256kB L2 DSP local RAM */ to     SHDSPL2RAM   o = 0x11800000  l = 0x00040000  /* 256kB L2 Shared Internal RAM */

What I have bee trying to do now is run the same example but in the ARM.

I can't run the spi example without edma or with it. The example is able to talk through the UART and I have also configure the PIN MUX accordingly.

The code gets stuck in:

Any suggestions on what to try or loo for will help.

  • Dear Hoffiz,

    I can't run the spi example without edma or with it. The example is able to talk through the UART and I have also configure the PIN MUX accordingly.

    Please make sure that SPI0 & CS PINMUX settings are good. PINMUX register is different for OMAPL137 & OMAPL138.

    Have you modified the PSC settings for SPI0 ?
    PSC module is different for SPI0 peripheral.
    You have to use like this.
    SPI0:
    /* Waking up the SPI0 instance. */
    PSCModuleControl(SOC_PSC_0_REGS, HW_PSC_SPI0, PSC_POWERDOMAIN_ALWAYS_ON,
    PSC_MDCTL_NEXT_ENABLE);
    SPI1:
    /* Waking up the SPI1 instance. */
    PSCModuleControl(SOC_PSC_1_REGS, HW_PSC_SPI1, PSC_POWERDOMAIN_ALWAYS_ON,
    PSC_MDCTL_NEXT_ENABLE);
  • Hi Titus,

    Please excuse the long delay to reply. Yes, I have checked both items you listed. They are the same as the project I have working on the dsp side of the omapl137.

    Jaime
  • Hi Titus,

    You can close this thread. I found the issue. Two things: SPI0 is in PSC0 like you mention, although I did change it back to PSC1 and it still works. Maybe something in the GEL is turning it on. To keep things clear I have change my code to PSC0 per the documentation.

    The thing I was missing, and it is due to the fact that I'm patching, Starterware, rCSL, examples, etc. was:

    // Configure UART2 with the ARM CPU
    CSL_FINST(sysRegs->SUSPSRC, SYSCFG_SUSPSRC_SPI0SRC, ARM);

    Is that really necessary? it feels like this is for emulation purposes only but maybe an interrupt is consider an emulation halt.

    Also I needed supervisor privileges to change the emulation source.

    // Intrinsic Function; Gain 'supervisor' privileges
    _call_swi(ARM_PRIV_MODE_KEY);